Jump to content

Welcome to Gaming On Steroids Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account
Photo

[27 January 2016] Added OnDamage and OnAggro events.


  • This topic is locked This topic is locked
No replies to this topic

#1
Feretorix

Feretorix

    Administrator

  • Administrators
  • 3,159 posts

I will just post an example, and just let you know that both of the events work only when your hero is related.

OnDamage involves any damage dealt to you, or from you to somebody else. (thanks finndev)

OnAggro is again only detected against your champion, so you can't check if another minion just aggro-ed another one.

 

OnDamage(function(senderObj,receiverObj,damage)
PrintChat(string.format("<font color='#ff0000'>OnDamage:</font> Sender: [%s] Receiver: [%s] Damage: [%f]",GetObjectName(senderObj),GetObjectName(receiverObj),damage));
end)

OnAggro(function(Object,aggroFlag)
if aggroFlag == true then
	PrintChat(string.format("<font color='#ff0000'>OnAggro gained from = %s</font>",GetObjectName(Object)));
	else
	PrintChat(string.format("<font color='#00ff00'>OnAggro lost from = %s</font>",GetObjectName(Object)));
	end
end)


  • 2




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users