• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!

Detecting an Evasion effect?

Status
Not open for further replies.
Level 2
Joined
Apr 27, 2005
Messages
12
How do I detect such an event? E.g. Evasion, bash, critical strike etc. Also, what do I use for the unit? Is it triggering unit?
 
Level 12
Joined
Apr 29, 2005
Messages
999
Evaision is a bit difficult to simulate I think. But mabey it can be detected in a little bit crapy way.
Make a trigger that registers any unit attacked. Save the attackeds' life in a variable. Wait a short period of time and then se if it's life is lower than the saved vaule. Just an idea.
 
Level 1
Joined
Aug 4, 2005
Messages
1
Stun is easy to detect.

Event (generic unit) - unit is attacked
Condition (unit has specific buff) - unit has Stunned(pause) buff
Action - pick all units within playable map area matching condition, picked unit has Stunned(pause)buff

then use picked unit to do whatever u want with that unit (i think, or matching unit, i always forget)

Critical strike and evasion... now thats a tough one...
 
Level 13
Joined
Dec 29, 2004
Messages
597
iplaystarcraft said:
make a real variable and set it to random number between 1 and 100

if true
real var is less than or = to %of evasion
then
else

Man, you don't get the point. He want to detect event when the attacker deal critical strike or bash.

Actually, you can't detect it real smooth, you must create a trigger to detect it, depend on what ability you want to check (evasion, bash, or critical strike).
 
Status
Not open for further replies.
Top