• 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] Need help with a trigger!

Status
Not open for further replies.
Level 7
Joined
Jul 9, 2012
Messages
159
Need help with a trigger! - SOLVED

SOLVED :thumbs_up:


Greetings!

I am trying to create a trigger where 6 units are standing in a cirkle (with locust). Every time the boss looses 1/7 of max Hp, one of the units will die and will create 6 dummy units which will cast a carrion swarm out.

The problem is that the trigger only works once. I believe it's a problem with the boolean variable? :)

Here is the trigger:
  • Soulbound Explosion
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • DamageEventTarget Equal to LevonBossUnit
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • SoulboundExplosionBoolean[SoulboundExplosionInteger] Equal to True
              • (Life of LevonBossUnit) Less than or equal to (((Max life of LevonBossUnit) / 100.00) x (100.00 - (14.20 x (Real(SoulboundExplosionInteger)))))
        • Then - Actions
          • Game - Display to (All players) the text: !
          • Set SoulboundExplosionBoolean[SoulboundExplosionInteger] = False
          • Set SoulboundExplosionPoint[SoulboundExplosionInteger] = (Position of BoundSoulUnit[SoulboundExplosionInteger])
          • Unit - Kill BoundSoulUnit[SoulboundExplosionInteger]
          • For each (Integer SoulboundExplosionIndex[SoulboundExplosionInteger]) from 1 to 6, do (Actions)
            • Loop - Actions
              • Set SoulboundExplosionTargetPoint[SoulboundExplosionIndex[SoulboundExplosionInteger]] = (SoulboundExplosionPoint[SoulboundExplosionInteger] offset by 300.00 towards (60.00 x (Real(SoulboundExplosionIndex[SoulboundExplosionInteger]))) degrees)
              • Unit - Create 1 Dummy Dude for Player 12 (Brown) at SoulboundExplosionPoint[SoulboundExplosionInteger] facing Default building facing degrees
              • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
              • Unit - Add Soulbound Deathbolt to (Last created unit)
              • Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm SoulboundExplosionTargetPoint[SoulboundExplosionIndex[SoulboundExplosionInteger]]
              • Custom script: call RemoveLocation(udg_SoulboundExplosionTargetPoint[udg_SoulboundExplosionIndex[udg_SoulboundExplosionInteger]])
          • Custom script: call RemoveLocation(udg_SoulboundExplosionPoint[udg_SoulboundExplosionInteger])
          • Set SoulboundExplosionInteger = (SoulboundExplosionInteger + 1)
        • Else - Actions
(note: the initial value of the boolean variable is set to TRUE)
Thank you!
 
Last edited:
Level 25
Joined
May 11, 2007
Messages
4,650
Well is SoulboundExplosionBoolean[SoulboundExplosionInteger] Equal to True updated when you do Set SoulboundExplosionInteger = (SoulboundExplosionInteger + 1)
or will the next one be false and thus the condition will return a false?
 
Try putting some game messages in it to see what happens.

This is also not good to do.
  • SoulboundExplosionTargetPoint[SoulboundExplosionIndex[SoulboundExplosionInteger]]
You never use this variable and never remove it. SoulboundExplosionTargetPoint

Never use And all conditions unless it is inside an or all condition block.
If you read this it already says all conditions are true.
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
You should store last created unit in a variable since it is used more than once.

I think your problem is this.
  • Life of LevonBossUnit) Less than or equal to (((Max life of LevonBossUnit) / 100.00) x (100.00 - (14.20 x (Real(SoulboundExplosionInteger)))))
Check that value to make sure it is showing you the correct variable.

Also check to make sure that your other booleans are already set to true.

Use game messages for both of them.
 
Status
Not open for further replies.
Top