Hi all, i was creating a spell called Knockback. I got all the triggering correct except for the percentage. I'm trying to get a percentage to knockback an enemy unit. Here's my script:
This one is Knockback 1:
Event: A unit is attacked Condition: Attacking unit = tauren Action: For each Integer 1 - 10 do action: Turn on Trigger <Knockback 2> wait 0.2 seconds Turn off Trigger <Knockback2>
If you guys need to know, Knockback 2 is this: Event: Every 0.01 seconds Condition: Action Move <knockbacked> instantly to position of <knockbacked> with 5 offset towards <knockbacker> angle
is it me or is my integer thingy wrong? i can't figure it out! Any help is appreciated
Just put that at the begining of the actions : If ((Random integer number between 1 and 100) Less than or equal to 40) then do (Do nothing) else do (Skip remaining actions) 40 is the % chance. If you want it diffrent, change 40 to whatever you want