Yoshii
New Member
- Reaction score
- 74
I'm having an issue with my map heres how it my map work and whats the issue.
at start of game the game will open a number of lane depending on amount of player
so we have Maindoor array of 8 setup at init for each of the 8 door which is number of player; so basically what the game does in the case if player 3 or 6 are missing, it will not open gate 3 and 6.When a player leave the corresponding gate is closed and a variable named IsDoorOpen keep track of which door is open.
what Im trying to do is for example
only player 1 and 3 are left in the game with game lane open 1 and 3(already working).BUT i want the game to open lane number 2(as its the first closed lane out of 8) when I write -open
heres the trigger
Now i know its obviously wrong as it open all door but I cant figure out an action that would pick the 1st array in DoorIsOpen that is False and do Open Maindoor(same array)
at start of game the game will open a number of lane depending on amount of player
so we have Maindoor array of 8 setup at init for each of the 8 door which is number of player; so basically what the game does in the case if player 3 or 6 are missing, it will not open gate 3 and 6.When a player leave the corresponding gate is closed and a variable named IsDoorOpen keep track of which door is open.
what Im trying to do is for example
only player 1 and 3 are left in the game with game lane open 1 and 3(already working).BUT i want the game to open lane number 2(as its the first closed lane out of 8) when I write -open
heres the trigger
Trigger:
- OpenCommand
- Events
- Player - Player 1 (Red) types a chat message containing -open as An exact match
- Conditions
- Actions
- For each (Integer A) from 1 to 8, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- DoorIsOpen[(Integer A)] Equal to False
- Then - Actions
- For each (Integer B) from 1 to 8, do (Actions)
- Loop - Actions
- Destructible - Open Maindoor[(Integer B)]
- Loop - Actions
- For each (Integer B) from 1 to 8, do (Actions)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- For each (Integer A) from 1 to 8, do (Actions)
- Events
Now i know its obviously wrong as it open all door but I cant figure out an action that would pick the 1st array in DoorIsOpen that is False and do Open Maindoor(same array)