[Trigger] autocast question

Status
Not open for further replies.
Level 19
Joined
May 1, 2008
Messages
1,129
so i see these descriptions on items like "gives a 15% chance to cast spell x on attack" how does that 15% chance work?
 
  • Events
    • Unit - A Unit is attacked
  • Conditions
    • Level of *your ability* equal to 1
    • Random integer number between 1 and 100 less or equal than 15
  • Actions
    • Set temppointA = (Position of (Attacking Unit))
    • Unit - Create 1 *dummy* at temppointA for (Owner of (Attacking Unit))
    • Unit - Add *your spell* to (last created unit)
    • Unit - Order (last created unit) to *whatever spell*
    • Unit - Add a 2 seconds general expiration timer to (last created unit)
    • Custom script: call RemoveLocation(udg_temppointA)
Shall work.. be sure to set the ability's manacost which you give to the dummyunit to zero ;)
 
Status
Not open for further replies.
Back
Top