• 🏆 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!

Ow/Cw

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
  • Ow 1
    • Events
      • Player - Player 1 (Red) types a chat message containing -ow as An exact match
    • Conditions
      • Ow Equal to 0
    • Actions
      • Set Ow = 1
      • For each (Integer TempInt) from 1 to Ow, do (Actions)
        • Loop - Actions
          • Trigger - Turn off NightElf_Wave[TempInt]
          • Trigger - Turn off Orc_Wave[TempInt]
          • Trigger - Turn off Human_Wave[TempInt]
          • -------- - --------
          • Trigger - Add to Human_Wave[TempInt] the event (Time - Elapsed game time is 25.00 seconds)
          • Trigger - Turn on Human_Wave[TempInt]
      • Game - Display to (All players) the text: (|c00FFD700Gate + ((|c00FFD700 + (String(Ow))) + |c00FFD700is opened!))
  • Ow 2
    • Events
      • Player - Player 1 (Red) types a chat message containing -ow as An exact match
    • Conditions
      • Ow Equal to 1
    • Actions
      • Set Ow = 2
      • For each (Integer TempInt) from 1 to Ow, do (Actions)
        • Loop - Actions
          • Trigger - Turn off NightElf_Wave[TempInt]
          • Trigger - Turn off Orc_Wave[TempInt]
          • Trigger - Turn off Human_Wave[TempInt]
          • -------- - --------
          • Trigger - Add to Human_Wave[TempInt] the event (Time - Elapsed game time is 25.00 seconds)
          • Trigger - Turn on Human_Wave[TempInt]
      • Game - Display to (All players) the text: (|c00FFD700Gate + ((|c00FFD700 + (String(Ow))) + |c00FFD700is opened!))
  • Ow 3
    • Events
      • Player - Player 1 (Red) types a chat message containing -ow as An exact match
    • Conditions
      • Ow Equal to 2
    • Actions
      • Set Ow = 3
      • For each (Integer TempInt) from 1 to Ow, do (Actions)
        • Loop - Actions
          • Trigger - Turn off NightElf_Wave[TempInt]
          • Trigger - Turn off Orc_Wave[TempInt]
          • Trigger - Turn off Human_Wave[TempInt]
          • -------- - --------
          • Trigger - Add to Human_Wave[TempInt] the event (Time - Elapsed game time is 25.00 seconds)
          • Trigger - Turn on Human_Wave[TempInt]
      • Game - Display to (All players) the text: (|c00FFD700Gate + ((|c00FFD700 + (String(Ow))) + |c00FFD700is opened!))
  • Ow 4
    • Events
      • Player - Player 1 (Red) types a chat message containing -ow as An exact match
    • Conditions
      • Ow Equal to 3
    • Actions
      • Set Ow = 4
      • For each (Integer TempInt) from 1 to Ow, do (Actions)
        • Loop - Actions
          • Trigger - Turn off NightElf_Wave[TempInt]
          • Trigger - Turn off Orc_Wave[TempInt]
          • Trigger - Turn off Human_Wave[TempInt]
          • -------- - --------
          • Trigger - Add to Human_Wave[TempInt] the event (Time - Elapsed game time is 25.00 seconds)
          • Trigger - Turn on Human_Wave[TempInt]
      • Game - Display to (All players) the text: (|c00FFD700Gate + ((|c00FFD700 + (String(Ow))) + |c00FFD700is opened!))
  • Ow 5
    • Events
      • Player - Player 1 (Red) types a chat message containing -ow as An exact match
    • Conditions
      • Ow Equal to 4
    • Actions
      • Set Ow = 5
      • For each (Integer TempInt) from 1 to Ow, do (Actions)
        • Loop - Actions
          • Trigger - Turn off NightElf_Wave[TempInt]
          • Trigger - Turn off Orc_Wave[TempInt]
          • Trigger - Turn off Human_Wave[TempInt]
          • -------- - --------
          • Trigger - Add to Human_Wave[TempInt] the event (Time - Elapsed game time is 25.00 seconds)
          • Trigger - Turn on Human_Wave[TempInt]
      • Game - Display to (All players) the text: (|c00FFD700Gate + ((|c00FFD700 + (String(Ow))) + |c00FFD700is opened!))
  • Ow 6
    • Events
      • Player - Player 1 (Red) types a chat message containing -ow as An exact match
    • Conditions
      • Ow Equal to 5
    • Actions
      • Set Ow = 6
      • For each (Integer TempInt) from 1 to Ow, do (Actions)
        • Loop - Actions
          • Trigger - Turn off NightElf_Wave[TempInt]
          • Trigger - Turn off Orc_Wave[TempInt]
          • Trigger - Turn off Human_Wave[TempInt]
          • -------- - --------
          • Trigger - Add to Human_Wave[TempInt] the event (Time - Elapsed game time is 25.00 seconds)
          • Trigger - Turn on Human_Wave[TempInt]
      • Game - Display to (All players) the text: (|c00FFD700Gate + ((|c00FFD700 + (String(Ow))) + |c00FFD700is opened!))
  • Ow 7
    • Events
      • Player - Player 1 (Red) types a chat message containing -ow as An exact match
    • Conditions
      • Ow Equal to 6
    • Actions
      • Set Ow = 7
      • For each (Integer TempInt) from 1 to Ow, do (Actions)
        • Loop - Actions
          • Trigger - Turn off NightElf_Wave[TempInt]
          • Trigger - Turn off Orc_Wave[TempInt]
          • Trigger - Turn off Human_Wave[TempInt]
          • -------- - --------
          • Trigger - Add to Human_Wave[TempInt] the event (Time - Elapsed game time is 25.00 seconds)
          • Trigger - Turn on Human_Wave[TempInt]
      • Game - Display to (All players) the text: (|c00FFD700Gate + ((|c00FFD700 + (String(Ow))) + |c00FFD700is opened!))
  • Ow 8
    • Events
      • Player - Player 1 (Red) types a chat message containing -ow as An exact match
    • Conditions
      • Ow Equal to 7
    • Actions
      • Set Ow = 8
      • For each (Integer TempInt) from 1 to Ow, do (Actions)
        • Loop - Actions
          • Trigger - Turn off NightElf_Wave[TempInt]
          • Trigger - Turn off Orc_Wave[TempInt]
          • Trigger - Turn off Human_Wave[TempInt]
          • -------- - --------
          • Trigger - Add to Human_Wave[TempInt] the event (Time - Elapsed game time is 25.00 seconds)
          • Trigger - Turn on Human_Wave[TempInt]
      • Game - Display to (All players) the text: (|c00FFD700Gate + ((|c00FFD700 + (String(Ow))) + |c00FFD700is opened!))
  • Cw 1
    • Events
      • Player - Player 1 (Red) types a chat message containing -cw as An exact match
    • Conditions
      • Ow Equal to 1
    • Actions
      • Trigger - Turn off NightElf_Wave[Ow]
      • Trigger - Turn off Orc_Wave[Ow]
      • Trigger - Turn off Human_Wave[Ow]
      • Game - Display to (All players) the text: (|c00FFD700Gate + ((|c00FFD700 + (String(Ow))) + |c00FFD700is closed!))
      • Set Ow = 0
  • Cw 2
    • Events
      • Player - Player 1 (Red) types a chat message containing -cw as An exact match
    • Conditions
      • Ow Equal to 2
    • Actions
      • Trigger - Turn off NightElf_Wave[Ow]
      • Trigger - Turn off Orc_Wave[Ow]
      • Trigger - Turn off Human_Wave[Ow]
      • Game - Display to (All players) the text: (|c00FFD700Gate + ((|c00FFD700 + (String(Ow))) + |c00FFD700is closed!))
      • Set Ow = 1
  • Cw 3
    • Events
      • Player - Player 1 (Red) types a chat message containing -cw as An exact match
    • Conditions
      • Ow Equal to 3
    • Actions
      • Trigger - Turn off NightElf_Wave[Ow]
      • Trigger - Turn off Orc_Wave[Ow]
      • Trigger - Turn off Human_Wave[Ow]
      • Game - Display to (All players) the text: (|c00FFD700Gate + ((|c00FFD700 + (String(Ow))) + |c00FFD700is closed!))
      • Set Ow = 2
  • Cw 4
    • Events
      • Player - Player 1 (Red) types a chat message containing -cw as An exact match
    • Conditions
      • Ow Equal to 4
    • Actions
      • Trigger - Turn off NightElf_Wave[Ow]
      • Trigger - Turn off Orc_Wave[Ow]
      • Trigger - Turn off Human_Wave[Ow]
      • Game - Display to (All players) the text: (|c00FFD700Gate + ((|c00FFD700 + (String(Ow))) + |c00FFD700is closed!))
      • Set Ow = 3
  • Cw 5
    • Events
      • Player - Player 1 (Red) types a chat message containing -cw as An exact match
    • Conditions
      • Ow Equal to 5
    • Actions
      • Trigger - Turn off NightElf_Wave[Ow]
      • Trigger - Turn off Orc_Wave[Ow]
      • Trigger - Turn off Human_Wave[Ow]
      • Game - Display to (All players) the text: (|c00FFD700Gate + ((|c00FFD700 + (String(Ow))) + |c00FFD700is closed!))
      • Set Ow = 4
  • Cw 6
    • Events
      • Player - Player 1 (Red) types a chat message containing -cw as An exact match
    • Conditions
      • Ow Equal to 6
    • Actions
      • Trigger - Turn off NightElf_Wave[Ow]
      • Trigger - Turn off Orc_Wave[Ow]
      • Trigger - Turn off Human_Wave[Ow]
      • Game - Display to (All players) the text: (|c00FFD700Gate + ((|c00FFD700 + (String(Ow))) + |c00FFD700is closed!))
      • Set Ow = 5
  • Cw 7
    • Events
      • Player - Player 1 (Red) types a chat message containing -cw as An exact match
    • Conditions
      • Ow Equal to 7
    • Actions
      • Trigger - Turn off NightElf_Wave[Ow]
      • Trigger - Turn off Orc_Wave[Ow]
      • Trigger - Turn off Human_Wave[Ow]
      • Game - Display to (All players) the text: (|c00FFD700Gate + ((|c00FFD700 + (String(Ow))) + |c00FFD700is closed!))
      • Set Ow = 6
  • Cw 8
    • Events
      • Player - Player 1 (Red) types a chat message containing -cw as An exact match
    • Conditions
      • Ow Equal to 8
    • Actions
      • Trigger - Turn off NightElf_Wave[Ow]
      • Trigger - Turn off Orc_Wave[Ow]
      • Trigger - Turn off Human_Wave[Ow]
      • Game - Display to (All players) the text: (|c00FFD700Gate + ((|c00FFD700 + (String(Ow))) + |c00FFD700is closed!))
      • Set Ow = 7
In the Cw triggers, everything works okay, but in Ow triggers, once I type ''-ow'', all the gates gets opened everytime (all 8 Ow triggers runs....)
How to prevent that?
 
Level 25
Joined
Sep 26, 2009
Messages
2,379
Could the order of those OW triggers be the problem? I don't really know how these things works, but if you look at normal trigger's actions, it reads actions from top to the bottom.

If the order, in which all triggers are read, goes the same way, then it would make sense that it successfully fires all 8 triggers.
If you look at CW triggers, their CW value decreases with each new trigger, however at OW, its the other way around.

In OW1 trigger it checks if OW value is 0. Since it is, it changes OW value to 1. If OW2 trigger is read/checked after OW1, then the condition would be true as well, because by that time, OW1 changed OW value to 1. Thus OW2 fires and changes OW value to 2 and so on.
So try changing the order of those triggers, OW8 being on top and OW 1 at bottom.


-------------------
Wouldn't this need just one trigger, where you set OW value to OW = (OW + 1)? Same for CW, but there it would be CW = (CW - 1)

Edit: Something like this
  • OW
    • Events
      • Player - Player 1 (Red) types a chat message containing -ow as An exact match
    • Conditions
    • Actions
      • Set OW = (OW + 1)
      • For each (Integer TempInt) from 1 to OW, do (Actions)
        • Loop - Actions
          • -------- Your loop actions --------
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
Could the order of those OW triggers be the problem? I don't really know how these things works, but if you look at normal trigger's actions, it reads actions from top to the bottom.

If the order, in which all triggers are read, goes the same way, then it would make sense that it successfully fires all 8 triggers.
If you look at CW triggers, their CW value decreases with each new trigger, however at OW, its the other way around.

In OW1 trigger it checks if OW value is 0. Since it is, it changes OW value to 1. If OW2 trigger is read/checked after OW1, then the condition would be true as well, because by that time, OW1 changed OW value to 1. Thus OW2 fires and changes OW value to 2 and so on.
So try changing the order of those triggers, OW8 being on top and OW 1 at bottom.


-------------------
Wouldn't this need just one trigger, where you set OW value to OW = (OW + 1)? Same for CW, but there it would be CW = (CW - 1)

Edit: Something like this
  • OW
    • Events
      • Player - Player 1 (Red) types a chat message containing -ow as An exact match
    • Conditions
    • Actions
      • Set OW = (OW + 1)
      • For each (Integer TempInt) from 1 to OW, do (Actions)
        • Loop - Actions
          • -------- Your loop actions --------

this is the exact problem. thats y i suggested changing the names. its just easier that way.
 
Status
Not open for further replies.
Top