Evasion 'art'

Status
Not open for further replies.

clicheofdoom

C

clicheofdoom

I have a blademaster hero on my map with an ability I named 'Illusion', which is evasion. What I want to happen is, when he dodges an attack, to create the special effect on him for the mirror image ability. It should appear that he has evaded the attack by temporarily splitting ...

But I don't know how I could do this. Would I need JASS? Or perhaps it'd be possible by basing it on a different ability?
 
well, the best would be in jass (for MUI), but it can be done by triggers.

trigger #1
event - hero learns a skill
cond - learned skill == Illusion
action - set EvasionUnit = triggering unit

trigger #2
event - EvasionUnit is damaged
action:
if (RandomInteger between 1 and 100) < 20 (this means 20% chance:) )
set EvasionUnit's life to (life of EvasionUnit + Event damage)
create special effect on EvasionUnit...

thats all

If you want, i can write this to you is jass to be MUI.
 
paskovitch - you're making the famous mistake that everyone (except my newer ones) who have done Shield spells make

EventDamage registers BEFORE ( 0 seconds before ) the damage is dealt, so if GetUnitState( u, UNIT_STATE_LIFE ) + GetEventDamage() > GetUnitState( u, UNIT_STATE_MAX_LIFE ) then all the damage wont be prevented, as it will heal before being damaged, which isnt very effective :)

therefore, use my if/then statement up there and do the normal way on the Else. however, if that is in the Then, put a call TriggerSleepAction( 0 ) or call TriggerSleepAction( .01 ) in front of the Regain Life thing
 
Well yeah, it looks great and everything, but I have no idea how to put it in my map ^^ Could your perhaps put it in copy and paste form or similar? that'd rawk ;)
 
ummm...you can't have Unit - unit is damaged register damage for a unit variable. The event function will only accept preplaced units on the map as parameters. You can't even input a unit variable into that event using GUI, and if you try to input a unit variable using JASS [i.e. call TriggerRegisterUnitEvent( gg_trg_Evasion, EVENT_UNIT_DAMAGED, udg_EvasionUnit )], the trigger will simply not fire when the unit stored in the unit variable is damaged.
 
I understand the difficulties with it but I'm sure this is possible as I've seen it been done on other maps before. Is there a different ability I could base it on, but just not get the 'miss' test?
 
OR
You can get hardened skin and edit its ability status.I think that will work just make it so its not always damage reduced and change the damage reduced to 9999999.The spell should display mirror image..No I am not 100% sure but its worth a try! :P
 
Ok I'll give it a go, thanks ;) I'll let you know the outcome in a sec ...
 
Yeah it worked really well :D thanks a lot, I thought there was an ability that 'blocked' damage rather than dodged it but didn't know which. No JASS or triggeres required!
 
Status
Not open for further replies.
Back
Top