• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Fixing Infinite Loop

Status
Not open for further replies.
Level 4
Joined
Dec 5, 2011
Messages
75
Hey guys i have been searching on forums and i know my problem is infinite loop but i still cant fix it (still crashing the game) can someone help me?
Thanks!
edit:Im using damage detection system but maybe im using it in a wrong way?

  • DUAL WIELD
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Dual Wield for (Attacking unit)) Equal to (==) 1
      • (Unit-type of (Attacking unit)) Equal to (==) Ninja
    • Actions
      • Set Ninja_Unit = (Attacking unit)
      • Set TargetUnit = (Attacked unit)
      • Sound - Play MetalHeavySliceFlesh2 <gen> at 100.00% volume, attached to Ninja_Unit
      • Sound - Destroy (Last played sound)
      • Trigger - Turn off (This trigger)
      • Trigger - Turn on DAMAGE <gen>


  • DAMAGE
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
    • Actions
      • Unit - Cause Ninja_Unit to damage TargetUnit, dealing GDD_Damage damage of attack type Normal and damage type Normal
      • Trigger - Turn off (This trigger)
      • Trigger - Turn on DUAL WIELD <gen>
 
Level 4
Joined
Dec 5, 2011
Messages
75
Yes i see the loop but by disabling the trigger before the unit do damage ,didnt i stop the loop?
 
Level 4
Joined
Dec 5, 2011
Messages
75
Alright, i made it work now! what i did is addding Unit type comparison as condition in second trigger to my attacking unit and make the dummy do damage for you.
Thanks for the help Kobas! topic solved!
 
Status
Not open for further replies.
Top