• 🏆 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!
  • ✅ HD Level Design Contest #1 POLL is now OPEN! Check out the stunning visuals of the final entries. 🔗Click here to cast your vote!

[Solved] Trigger Making WarCraft Crash

Status
Not open for further replies.
Alright, for some reason this trigger is making the game crash.

Its effect is supposed to make the unit deal 35% more damage to structures. I'm not too sure what's making it crash, though.

  • Goliath Demolish
    • Events
    • Conditions
      • ((Triggering unit) is A structure) Equal to True
      • (Unit-type of (Damage source)) Equal to Goliath
    • Actions
      • Set DemolishDamageTaken = (Damage taken)
      • Set DemolishDamageSource = (Damage source)
      • Set DemolishTarget = (Triggering unit)
      • Set DemolishBonusDamage = (DemolishDamageTaken x 0.35)
      • Unit - Cause DemolishDamageSource to damage DemolishTarget, dealing DemolishBonusDamage damage of attack type Siege and damage type Normal
      • Floating Text - Create floating text that reads ((String((Integer((DemolishDamageTaken + DemolishBonusDamage))))) + !) above DemolishTarget with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
      • Set DemolishText = (Last created floating text)
      • Floating Text - Set the velocity of DemolishText to 64.00 towards 90.00 degrees
      • Floating Text - Change DemolishText: Disable permanence
      • Floating Text - Change the lifespan of DemolishText to 1.50 seconds
      • Floating Text - Change the fading age of DemolishText to 0.75 seconds
 
Level 10
Joined
Jul 12, 2009
Messages
318
I assume the event is a damage event, added by some other trigger?

You're causing an infinite loop by dealing damage from the same source, which is then detected as damage and runs the trigger again, and again...

Use an action to turn off that trigger at the start, and turn it on again at the end, so it can't trigger itself.
 
Status
Not open for further replies.
Top