• 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.

[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