• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

As long as

Status
Not open for further replies.
Level 11
Joined
Jan 23, 2015
Messages
788
Yes, I know about that, but I have another event in the trigger I'm speaking of, and when I put periodic event, it does not work :/
and also, I can't do it with a variable, cause the trigger that must be activated may be used by multiple units... it's an autocast ability, the trigger must activate as long as the ability is autocast
 
Level 9
Joined
May 21, 2014
Messages
580
Yes, I know about that, but I have another event in the trigger I'm speaking of, and when I put periodic event, it does not work :/
and also, I can't do it with a variable, cause the trigger that must be activated may be used by multiple units... it's an autocast ability, the trigger must activate as long as the ability is autocast

Multiple Units? You may have to use indexing...

If it's an autocast ability, then you can just detect if the unit casts the spell.
It has an order. By this, manually casting and autocasting the spell will make the trigger fire.

Daffa is right though, I can't say much unless the spell concept is explained.
 
Level 11
Joined
Jan 23, 2015
Messages
788
Hmm, I can't use indexes, cause I cannot know which unit may autocast the ability.. ..

  • Spell 1 Autocast
    • Events
      • Time - Every 0.40 seconds of game time
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(replenishlifeon))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(replenishlifeon))
        • Then - Actions
          • Unit - Order (Ordered unit) to Undead Obsidian Statue - Essence of Blight
          • Game - Display to (All players) the text: ability cast
          • Wait 0.40 seconds
          • Trigger - Run (This trigger) (checking conditions)
        • Else - Actions
          • Wait 0.40 seconds
          • Trigger - Run (This trigger) (ignoring conditions)
I've made another trigger about the ability, which works perfectly fine, but the autocast only works when I activate it, and then I have to deactivate it and activate it again so it will fire again...
I want to make it to fire automatically if autocast is activated :/

any solutions?
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,207
Your trigger is wrong in more than one way.

  • Auto Check
    • 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(healon))
        • Then - Actions
          • Unit Group - Add (Triggering unit) to enabled
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Issued order) Equal to (Order(healoff))
            • Then - Actions
              • Unit Group - Remove (Triggering unit) from enabled
            • Else - Actions
  • Loop
    • Events
      • Time - Every 0.40 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in enabled and do (Actions)
        • Loop - Actions
          • -------- order picked unit to cast --------
          • Game - Display to (All players) the text: update!
or use the following if you really want to merge them like you wanted.
  • Loop
    • Events
      • Time - Every 0.40 seconds of game time
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • Custom script: if GetTriggerEventId() == ConvertUnitEvent(38) then
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(healon))
        • Then - Actions
          • Unit Group - Add (Triggering unit) to enabled
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Issued order) Equal to (Order(healoff))
            • Then - Actions
              • Unit Group - Remove (Triggering unit) from enabled
            • Else - Actions
      • Custom script: else
      • Unit Group - Pick every unit in enabled and do (Actions)
        • Loop - Actions
          • -------- order picked unit to cast --------
          • Game - Display to (All players) the text: update!
      • Custom script: endif
 
Status
Not open for further replies.
Top