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

Open and Close way

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
hello hivers, need help in this xD

In this trigger, I made when a button is clicked, the trigger sets the variable OpenedGates_Variable to be the integer number 2

  • Set Open Wave
    • Events
      • Dialog - A dialog button is clicked for Dialog[2]
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Dialog_Button[1]
        • Then - Actions
          • Set OpenedGates_Variable = (OpenedGates_Variable + 2)
        • Else - Actions
Now in This Trigger, i make when I type -ow, the trigger sets another variable
OpenWave[1] to be OpenedGates_Variable + 1

  • Open Wave
    • Events
      • Player - Player 1 (Red) types a chat message containing -ow as An exact match
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • OpenedGates_Variable Equal to 2
        • Then - Actions
          • Set OpenWave[1] = (OpenedGates_Variable + 1)
          • Trigger - Add to HumanWaves[OpenWave[1]] the event (Time - Elapsed game time is 25.00 seconds)
          • Trigger - Turn on HumanWaves[OpenWave[1]]
          • Game - Display to (All players) the text: (Way + ((String(OpenWave[1])) + is Opened!))
        • Else - Actions
Now what I want: How can I make the variable OpenWave[1] goes always +1 when I type -ow?
Example: Typing -ow. The Variable OpenWave[1] is now integer number 3 and the trigger number 3 will turn on. I want everytime when I type -ow, for OpenWave[1] variable to stay (OpenedGates_Variable + 1) and goes again +1

Just tell me and I will try to explain you more ;), i need this asap if possible
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Why are you using an integer array for this? Why don't you use a simple integer?

You have to spawn the creeps within a loop, and make Spawns and Regions and Doors match in the same index.

OpenWays = 5
Loop from 0 to OpenWave
Create X creeps at Center of Region[IntegerA]
...

How can I make the variable OpenWave[1] goes always +1 when I type -ow?
  • Set OpenWave[1] = OpenWave[1] + 1
 
Level 18
Joined
May 11, 2012
Messages
2,103
You have to spawn the creeps within a loop, and make Spawns and Regions and Doors match in the same index.

OpenWays = 5
Loop from 0 to OpenWave
Create X creeps at Center of Region[IntegerA]
...[/QUOTE]

oh god, that's what i was afraid of... there are lot of spawn triggs..
 
Status
Not open for further replies.
Top