• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Strings Disable Without If / Then / Else / Multiple Function

Status
Not open for further replies.
Level 5
Joined
Jan 5, 2019
Messages
108
Is it possible to disable a string like this one within another trigger if the only available "condition" is an action ?

  • Game - Display to (Player group((Owner of Units))) for 5.00 seconds the text: (|c0000FFFF Thorn Aura's |r Level + ( is + ( + (String((Level of Thorns Aura for Units))))))
Because if i use the condition which make everything work, it will destroy everything. or maybe some of you know how to make this action into an condition ?

  • Unit - For (Triggering unit), Ability Thorns Aura , Disable ability: True, Hide UI: True
I basically need this action to be an condition for what i know of.

Or maybe i don't know if there some conditions that affects another Trigger string
 
Last edited:
Level 5
Joined
Jan 5, 2019
Messages
108
Seems vague to me but a global boolean might be what you want

Sorry i can try explain it better. These 3 Triggers basically makes my Items / Spells checks if the player have used food = 5, And the two top triggers is my fix to the player can't buy more spells if the player used food = 5. but if the player tries to buy a spell it still tells the player that they learned the spell, even tho the spell gets disable.

  • Food Spell Thorn Aura
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Thorn Aura
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) Food used) Not equal to 5
        • Then - Actions
          • Player - Add 1 to (Owner of (Triggering unit)) Food used
        • Else - Actions
  • Cant Learn Thorn Aura
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Thorn Aura
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) Food used) Equal to 5
        • Then - Actions
          • Unit - For (Triggering unit), Ability Thorns Aura , Disable ability: True, Hide UI: True
        • Else - Actions
          • Player - Add 400 to (Owner of Units) Current gold
  • Thorn Aura
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Thorn Aura
    • Actions
      • Set Ability[(Player number of (Owner of Units))] = Thorns Aura
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Ability[(Player number of (Owner of Units))] for Units) Less than 1
        • Then - Actions
          • Unit - Add Ability[(Player number of (Owner of Units))] to Units
          • Game - Display to (Player group((Owner of Units))) for 5.00 seconds the text: |c0000FFFF Thorn Au...
          • Special Effect - Create a special effect attached to the origin of Units using Abilities\Spells\Items\AIem\AIemTarget.mdl
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Ability[(Player number of (Owner of Units))] for Units) Less than 10
            • Then - Actions
              • Unit - Increase level of Ability[(Player number of (Owner of Units))] for Units
              • Game - Display to (Player group((Owner of Units))) for 5.00 seconds the text: (|c0000FFFF Thorn Aura's |r Level + ( is + ( + (String((Level of Thorns Aura for Units))))))
              • Special Effect - Create a special effect attached to the origin of Units using Abilities\Spells\Items\AIem\AIemTarget.mdl
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
              • Game - Display to (Player group((Owner of Units))) for 5.00 seconds the text: This spell is alrea...
              • Player - Add 400 to (Owner of Units) Current gold
So i would be awesome if strings from the last trigger gets disable if the spell gets disable
 
Level 7
Joined
Apr 17, 2017
Messages
316
In your variable editor just create a boolean variable with an array in this case. And in the first trigger set it to true. In your last trigger lnside the condition block create another condition block to check if boolean[whatever] is true
Show ........ text
 
Level 6
Joined
Jan 9, 2019
Messages
102
Mate, do I have to write the entire thing for you?
  • Thorns Aura
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item being manipulated) Equal to Thorns Aura
    • Actions
      • Set Ability = Thorns Aura
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Ability for (Triggering unit)) Equal to 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Owner of (Triggering unit)) Food used) Less than 5
            • Then - Actions
              • Unit - Add Ability to (Triggering unit)
              • Player - Add 1 to (Owner of (Triggering unit)) Food used
              • Game - Display to (Player group((Owner of (Triggering unit)))) for 5.00 seconds the text: NEW ABILITY!
              • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
              • Player - Add 400 to (Owner of (Triggering unit)) Current gold
              • Game - Display to (Player group((Owner of (Triggering unit)))) for 5.00 seconds the text: NO MORE ABILITIES!
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Ability for (Triggering unit)) Less than 10
            • Then - Actions
              • Unit - Increase level of Ability for (Triggering unit)
              • Game - Display to (Player group((Owner of (Triggering unit)))) for 5.00 seconds the text: UPGRADED ABILITY!
              • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
              • Player - Add 400 to (Owner of (Triggering unit)) Current gold
              • Game - Display to (Player group((Owner of (Triggering unit)))) for 5.00 seconds the text: ABILITY MAXED!
 
Level 5
Joined
Jan 5, 2019
Messages
108
Mate, do I have to write the entire thing for you?
  • Thorns Aura
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item being manipulated) Equal to Thorns Aura
    • Actions
      • Set Ability = Thorns Aura
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Ability for (Triggering unit)) Equal to 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Owner of (Triggering unit)) Food used) Less than 5
            • Then - Actions
              • Unit - Add Ability to (Triggering unit)
              • Player - Add 1 to (Owner of (Triggering unit)) Food used
              • Game - Display to (Player group((Owner of (Triggering unit)))) for 5.00 seconds the text: NEW ABILITY!
              • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
              • Player - Add 400 to (Owner of (Triggering unit)) Current gold
              • Game - Display to (Player group((Owner of (Triggering unit)))) for 5.00 seconds the text: NO MORE ABILITIES!
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Ability for (Triggering unit)) Less than 10
            • Then - Actions
              • Unit - Increase level of Ability for (Triggering unit)
              • Game - Display to (Player group((Owner of (Triggering unit)))) for 5.00 seconds the text: UPGRADED ABILITY!
              • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIem\AIemTarget.mdl
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
              • Player - Add 400 to (Owner of (Triggering unit)) Current gold
              • Game - Display to (Player group((Owner of (Triggering unit)))) for 5.00 seconds the text: ABILITY MAXED!

Sorry man i didn't mean to upset you or anything, i really appreciated your help thanks again :)
 
Status
Not open for further replies.
Top