• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Can anybody tell me how this crashes Wc3?

Status
Not open for further replies.
Target = Integer to determine which enemy is selected
TargetMax = Max of Target
IfAttack/Skill/ItemTime = Just un-necessary booleans
EnemyIsEmpty = If enemy slot is empty
EnemyIsDead = Its what it is
Trigger Battle ActionsUpdateTarget = Contains variables that set TargetedEnemy to Target


  • Battle ActionsRightTARGET
    • Events
      • Player - Player 1 (Red) Presses the Right Arrow key
    • Conditions
      • Multiple ConditionsOr - Any (Conditions) are true
        • Conditions
          • IfAttackTime Equal to (==) True
          • IfSkillTime Equal to (==) True
          • IfItemTime Equal to (==) True
    • Actions
      • Set Target = (Target - 1)
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Target Greater than (>) TargetMax
          • Then - Actions
            • Set Target = 1
          • Else - Actions
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Multiple ConditionsOr - Any (Conditions) are true
              • Conditions
                • EnemyIsEmpty[Target] Equal to (==) False
                • EnemyIsDead[Target] Equal to (==) True
          • Then - Actions
            • Trigger - Run (This trigger) (checking conditions)
          • Else - Actions
      • Trigger - Run Battle ActionsUpdateTarget <gen> (ignoring conditions)
 
Level 10
Joined
Oct 5, 2008
Messages
355
What crashes your map is the second if/then/else block. It chrcks if either the choosen slot is empty or the unit in the slot is dead, thus firing the trigger again. I assume that none of your slots are empty, so this block is always true, thus creating an infinite loop. I dont know exactly what you want to check there, but i suppose it is that if it contains a living unit and is not empty. In that case enenyisempty should be checked if it is true. But like i said, i dont jnow exactly when it shiuld change the integer.
 
Status
Not open for further replies.
Top