• 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] Auto Trigger

Status
Not open for further replies.
Level 16
Joined
Oct 12, 2008
Messages
1,570
You mean when mana runs out? I think you got no other option but put every unit that casts immolation in a group (order event and order string comparison) and check if it has enough mana with a periodic trigger,, of course also check if it doesnt order to turn off in between, if so,, remove the unit from the group,,
  • Order
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(immolation))
        • Then - Actions
          • Unit Group - Add (Triggering unit) to ImmolationGroup
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Issued order) Equal to (Order(unimmolation))
            • Then - Actions
              • Unit Group - Remove (Triggering unit) from ImmmolationGroup
            • Else - Actions
  • Periodic
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Last created unit group) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Mana of (Picked unit)) Less than 0.40
            • Then - Actions
              • Game - Display to (All players) the text: HIS MANA RAN OUT WHILE USING IMMOLATION
            • Else - Actions
I am not sure about the 0.40 real number in the comparison,, you should ask someone about it,,
 
Level 9
Joined
Apr 7, 2008
Messages
176
I'll just make it shut off when their mana gets below 10.
But yeah, it looks like I have no other choice. Great Idea man thanks. Thats kinda what I had been working towards, when making my trigger. Just for some reason my mind kept going around the Unit Group idea.
Plus rep to you brother.
 
Level 9
Joined
Jun 7, 2008
Messages
440
There is also a wait until condition - checking every (x seconds)you could use. That would save the if/then/else, as well as the using a separate trigger. I have a similar trigger which uses immolation/ unimmolation. then run the trigger.
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
Well, you seem to forget that wait until condition does the same, it makes a loop with a triggersleepaction in it (wait) and it only exits when the condition is true,, what we do is more accurate, since TriggerSleepAction(wait) really sucks ballz,, and that also doesnt cover the turning off immolation, what if you turn it on, it waits, waits, you turn it off, but it still waits untill you have 0 mana, what if he wants to make an effect when it turns off the immolation, it could stop the waiting when you do a spell that uses exactly the same amount of mana that you have got left, it would make the effect then,,
 
Level 9
Joined
Apr 7, 2008
Messages
176
well, my spell requires a mana buffer of over 10, so it would be fine.
And for the others, If it checks for the buff that the spell gives, so is previously shut off by the spell and in another trigger. then this one wouldnd need to run.
Here is the reason I need this to work. My DBZ Spellpack. Just incase you wanted to take a look at the spell so far.
 
Last edited:
Status
Not open for further replies.
Top