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

[16 December 2015] Added OnProcessSpellAttack, OnProcessSpellCast


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

#1
Feretorix

Feretorix

    Administrator

  • Administrators
  • 3,027 posts

For your ease, i have added two separate functions, which make a difference between auto-attacks and actual spells. (I am speaking about OnProcessSpell)

 

For example if you cast Jax[W] spell, "OnProcessSpellCast" will trigger, also your champ will gain a buff for a certain time.

 

After a bit, if you auto-attack, it will consume the [W] buff, but instead "OnProcessSpellAttack" will trigger, it will also trigger if you just do a normal auto-attack.

 

 

 

---------------------------

 

 

Some more info about the spellProc:

 

--spellProc.name = the name of the current spell cast (including autoattacks and such)
--spellProc.windUpTime = number holding the value of the required animation time for an attack to complete
--spellProc.animationTime = number holding the full animation time of an attack or spell (always greater than windUpTime)
--spellProc.castSpeed = proportional to "GetAttackSpeed(myHero);", returns the speed value of the casted spell or attack.
--spellProc.startPos.x
--spellProc.startPos.y = returns a VECTOR holding the starting position of the spell cast (often the same as GetOrigin(Object))
--spellProc.startPos.z 
--||||||||||||||||||||
--spellProc.endPos.x
--spellProc.endPos.y = returns a VECTOR holding the ending position of the spell cast (often the same as GetOrigin(Object))
--spellProc.endPos.z 
--||||||||||||||||||||
--spellProc.target = returns a pointer to a target if there is any (for example Ryze Q is skillshot without target, but his W does have target)
 
 
 
------------------------
 
A small example:
 

OnProcessSpellAttack(function(Object,spellProc)
if Object == GetMyHero() then
MessageBox(0,spellProc.name,"SpellAttack",0);
end
end)
 
OnProcessSpellCast(function(Object,spellProc)
if Object == GetMyHero() then
MessageBox(0,spellProc.name,"SpellCast",0);
end
end)


  • 1




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users