• 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.

%Change per attack gived or received to do somethin

Status
Not open for further replies.
Level 4
Joined
Aug 1, 2013
Messages
54
Ex: a unit is attacked
the attacking unit has 35% change to receive 50 magic damage and get stunned 1 second for attacking that unit (something like tiny passive from dota)
I just want to know a mechanism with changes not exactly a passive like tity's
 
Level 14
Joined
Nov 17, 2010
Messages
1,266
You would have to trigger it. You could either use A unit is attacked or a Damage Detection System to determine if a unit has been attacked. Then you can use the trigger to generate a random number between 1 and 100. Now use an if/then/else that says, if the random number is less than or equal to your percentage then do your action (extra damage or whatever)
 
Status
Not open for further replies.
Top