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

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 28
Joined
Sep 26, 2009
Messages
2,520
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 --------
 
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