• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[Solved] Crash to Desktop

Status
Not open for further replies.
Level 3
Joined
Aug 22, 2010
Messages
34
  • Trigger - Add to Bonus Undead Damage <gen> the event (Unit - (Last created unit) Takes damage)
  • Bonus Undead Damage
    • Events
    • Conditions
      • ((Triggering unit) is Undead) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Damage source)) Equal to High Elven Guard Tower
        • Then - Actions
          • Unit - Cause (Damage source) to damage (Attacked unit), dealing 3.00 damage of attack type Spells and damage type Normal
          • Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Orc\EtherealForm\SpiritWalkerChange.mdl
        • Else - Actions
When a unit takes damage this crashes the game to desktop. If I remove the cause damage bit it doesn't.

Why does this happen?
 
Good infinite loop example ;P

How your trigger could work with (Attacked unit) reference? o_O
(Position of (Triggering unit)) leaks.

This should help:
  • Bonus Undead Damage
    • Events
    • Conditions
      • ((Triggering unit) is Undead) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Damage source)) Equal to High Elven Guard Tower
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Unit - Cause (Damage source) to damage (Triggering unit), dealing 3.00 damage of attack type Spells and damage type Normal
          • Trigger - Turn on (This trigger)
          • Set p = (Position of (Triggering unit))
          • Special Effect - Create a special effect at p using Abilities\Spells\Orc\EtherealForm\SpiritWalkerChange.mdl
          • Custom script: call RemoveLocation(udg_p)
        • Else - Actions
Make sure you destroy effect too, when it won't be needed no more.
 
Status
Not open for further replies.
Top