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

[Spell] Checking Auto cast spells.

Status
Not open for further replies.
Level 4
Joined
Aug 7, 2010
Messages
77
Hello all, i wonder if there's a way to check an unit thats had just casted an auto cast spells. I've just tried on manual activate the spell and those lines of trigger works.

  • Untitled Trigger 001
    • Events
      • Unit - TestingUnit 0231 <gen> Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Trinity2 (Neutral Hostile)
    • Actions
      • Set TrinityRandom = (Random integer number between 0 and 10)
      • Game - Display to (All players) the text: (String(TrinityRandom))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TrinityRandom Less than or equal to 3
        • Then - Actions
          • Wait 1.00 seconds
          • Unit - Remove Trinity2 (Neutral Hostile) from TestingUnit 0231 <gen>
          • Unit - Add Trinity2 (Neutral Hostile) to TestingUnit 0231 <gen>
          • Unit - Order TestingUnit 0231 <gen> to Stop
        • Else - Actions
          • Do nothing
However this will not work if i were to auto cast it. Any idea how to check to see if an unit had cast an auto cast spell on itself and make a debug message to appear in the game. Thanks in advance!
 
Level 4
Joined
Jan 3, 2013
Messages
69
Yes, but you will need two triggers instead of one, and I dont know what's with the wait in there, I can show you the way of making your spell, but you must tell me ¿What does your spell is supposed to do?
 
Level 4
Joined
Aug 7, 2010
Messages
77
Oh sorry for the confusion. Basically my spell is something like searing arrow. Adds damage to base damage. So everytime the unit auto cast searing arrow, a dubug message will pop up to show that there are checks done to this spell.

edited*

My spell from above is like, everytime the spell is auto casted/casted manually, a random number will generate. This random number will determine where the spell will refresh its cooldown instantly.

Spell description:
Trinity
Deal 100 bonus damage to a target enemy. Will have a 30% chance of refreshing rate. Once refreshed, the cooldown will be removed instantly.
 
Status
Not open for further replies.
Top