• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Passive Trigger Activation.... (trigger activation with a passive ability)

Status
Not open for further replies.
Level 2
Joined
Apr 8, 2006
Messages
16
This might be a simple enough question, but I can't seem to figure out a good way to activate a trigger through the "usage" of a passive ability. The example in mind is having a trigger activate whenever a unit dodges an attack with the Evasion Ability. Any ideas would be appreciated.
 
Level 2
Joined
May 15, 2007
Messages
20
It can be done but the ability needes be trigger made.Make a dummy spell and do the evasion from triggers.Something like when unit learns the dummy ability set and x(variable) to a value ( lets say 75).Then make a trigger that detects when that unit is hit by something (meaning when it's attacked), it should have for an event - generic unit --> unit is attacked and for condition attacked unit = to "your unit" and it has the dummy evasion ability and as an action do a random selection sistem (forgot how it's made but you should find it on the hive) that picks a value between 1 and 100 and if that value is greater then the x variable (in our case 75 -> that will mean a 25% chance of evasion) then and here you can activate the trigger.As for the evasion i dont know if you can define an action that would say something like skip next attack damage (i'm saying this because the generic event of a unit being attacked detects the attack before the unit will be receving it--> something like the attacking unit starts it's animation to attack, now the event detects the damage and after 0.15 s or so the damage is dealt to the unit).Or you could try giving it an 100% evasion ability for a very short time (0.20 s or so) and after removing it --> you should try experimanting with this to se how it works best.Or do what i did for one of my custom spells, wait 0.25 sec and set the life of the unit to unit+damage recived (damage recived beeing an real variable that saves the damage that the unit takes) .And for the grafic evasion part; create a floating text above the attacking unit with the font sice of 5 or 6, and the color u prefer.Set it a velocity (the visual efect that makes the text go up) and a timer to destroy it after 1 or 2 secounds.
I know it sounds hard but try doing it and se what happens :)).It should be fun. ;)
 
Level 11
Joined
May 31, 2008
Messages
698
Rapidcore ur method bugs. What if there is a slow missile that doesnt reach the unit until after .25 seconds, or what if the unit "evades" an attack when it has like 10 hp left. And for adding 100% evasion, then that will evade ALL attacks for that short perion of time, not just the one attack. And how would you set ur damage recieved variable?

Wurmspawn did you actually try the event that a unit casts an ability with condition ability being cast is evasion? Idk if that will work since its passive, but you shud try it if you didnt alredy.
 
Status
Not open for further replies.
Top