- Joined
- Feb 25, 2007
- Messages
- 22
So I have this trigger (below) that crashes my map when it runs. It's pretty long, and so I'm guessing that I just miscoded it somewhere, and it's not doing exactly what I want it to. Here's a synopsis of what its intended for:
The map has 8 players, and and at the beginning, each player is targeting another player. First a trigger will run setting each player's target to an integer equal to the player's number +4. Then I will run this trigger.
This trigger is intended to do the following: If player X (Player_Targeter_Integer) is actually playing, I will check to make sure that his target integer is not above 8 (and change it if it is), then I will make sure that player X's target is playing, and change player X's target if they aren't. Whenever I find that a player has a real target, I will add 1 to the integer that counts how many players have a real target. The integer X will cycle through the numbers 1-8 until every player in the game has a real target and then terminate.
So that's how the trigger's supposed to work. Unfortunately, its been crashing my game. Any help fixing this problem would be greatly appreciated.
The map has 8 players, and and at the beginning, each player is targeting another player. First a trigger will run setting each player's target to an integer equal to the player's number +4. Then I will run this trigger.
This trigger is intended to do the following: If player X (Player_Targeter_Integer) is actually playing, I will check to make sure that his target integer is not above 8 (and change it if it is), then I will make sure that player X's target is playing, and change player X's target if they aren't. Whenever I find that a player has a real target, I will add 1 to the integer that counts how many players have a real target. The integer X will cycle through the numbers 1-8 until every player in the game has a real target and then terminate.
So that's how the trigger's supposed to work. Unfortunately, its been crashing my game. Any help fixing this problem would be greatly appreciated.
-
Set Targets
- Events
-
Conditions
- Test_Mode_Enabled Equal to False
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Player_Targeter_Integer Greater than 8
-
Then - Actions
- Set Player_Targeter_Integer = 1
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Player(Player_Targeter_Integer)) slot status) Equal to Is playing
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Player_Target[Player_Targeter_Integer] Greater than 8
-
Then - Actions
- Set Player_Target[Player_Targeter_Integer] = (Player_Target[Player_Targeter_Integer] - 8)
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Player(Player_Target[Player_Targeter_Integer])) slot status) Not equal to Is playing
-
Then - Actions
- Set Player_Target[Player_Targeter_Integer] = (Player_Target[Player_Targeter_Integer] + 1)
-
Else - Actions
- Set Players_With_Real_Target = (Players_With_Real_Target + 1)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Players_With_Real_Target Equal to Number_of_Players
-
Then - Actions
- Trigger - Turn off (This trigger)
-
Else - Actions
- Set Player_Targeter_Integer = (Player_Targeter_Integer + 1)
- Trigger - Run (This trigger) (checking conditions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Set Player_Targeter_Integer = (Player_Targeter_Integer + 1)
- Trigger - Run (This trigger) (checking conditions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)