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

[Trigger] autocast question

Status
Not open for further replies.
Level 19
Joined
May 1, 2008
Messages
1,130
so i see these descriptions on items like "gives a 15% chance to cast spell x on attack" how does that 15% chance work?
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
  • 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.
Top