|
|
So, I played around a bit to test how evasion and redirection (Zephyr's Wind Shield) affect the different triggers related to being attacked. I added an item with the following code:
The onattackedstart, onattackedpreimpact and ondamaged part worked when attacked normally, but the onattackimpact did not. Is it the wrong event or am I doing something else wrong?Code:<?xml version="1.0" encoding="UTF-8"?> <item name="Item_Attacktest" icon="icon.tga" cost="100" actiontype="passive" > <onattackedstart> <areaofeffect radius="1000" targetselection="all" targetscheme="enemy_nonboss_units" effecttype="" > <damage effecttype="Splash" amount="100" /> </areaofeffect> <popup name="bonus_damage" a="1" /> </onattackedstart> <onattackedpreimpact> <areaofeffect radius="1000" targetselection="all" targetscheme="enemy_nonboss_units" effecttype="" > <damage effecttype="Splash" amount="200" /> </areaofeffect> <popup name="bonus_damage" a="2" /> </onattackedpreimpact> <onattackimpact> <areaofeffect radius="1000" targetselection="all" targetscheme="enemy_nonboss_units" effecttype="" > <damage effecttype="Splash" amount="400" /> </areaofeffect> <popup name="bonus_damage" a="4" /> </onattackimpact> <ondamaged> <areaofeffect radius="1000" targetselection="all" targetscheme="enemy_nonboss_units" effecttype="" > <damage effecttype="Splash" amount="800" /> </areaofeffect> <popup name="bonus_damage" a="8" /> </ondamaged> </item>
For reference, when evasion or redirection triggers, ondamaged does of course not trigger.
13^3
In my posts, cursive grey text indicates very detailed or less relevant information, while blue text highlights important points or conclusions.
onattack* events are applied to you own attacks at the time of the attack.
onattacked* is for responding to other units' attacks.
onattacking* is for responding to your own unit's attacks (this occurs are a slightly different time than onattack*)
Also, some other things that may help you:Code:onattackstart onattack onattackpreimpact onattackpredamage onattackdamageevent onattackimpact onattackimpactinvalid onattackend onattackedstart onattackedpreimpact onattackedpredamage onattackeddamageevent onattackedpostimpact onattackingstart onattackingpreimpact onattackingpredamage onattackingdamageevent onattackingpostimpact
Documentation of all possible events, dynamic values, etc will come in the future.Code:<print text="Look, I'm text." /> <printvalue value="source_maxhealth" /> <printdebuginfo />
Last edited by S2Ikkyo; 10-13-2009 at 05:59 AM.
Thanks, both for the list and the promise of documentation; both of them will help a lot.
13^3
In my posts, cursive grey text indicates very detailed or less relevant information, while blue text highlights important points or conclusions.
Ikkyo could we get a Guides and Lists section soon since the stickies are getting crowded.
Former Master of the NightE.S. Posthumus__________________________________________________ __________________________________________________ ___________Nihilsomno, glory forever
I think a stickied Guides and Lists post would be better.
Moved to Guides & Lists for reference.
Yes I know the thread is old
S2 Games: Dedicated employees serving dedicated gamers. Continuous development. Never-ending improvement.
-----------------------------
Tech Support and Customer Support: https://www.heroesofnewerth.com/support/
Look for my highlighted text (important information) and grey text (interesting but not required information).