- Joined
- Aug 14, 2007
- Messages
- 66
Im trying to make a way for players to ally/unally/allow vision of eachother in game without making lots of triggers...
I've never really been sure exactly how to take apart what people typed and use it in a trigger.
Oh yeah and I mean for people to be able to vision eachother regardless of their current allied status.
Im using WEU (world editor unlimited)
When i tried this vision seemed fine but I dont have any way to know for sure if it worked but when I try to unally people the game has a critical error.
I've never really been sure exactly how to take apart what people typed and use it in a trigger.
Oh yeah and I mean for people to be able to vision eachother regardless of their current allied status.
Im using WEU (world editor unlimited)
When i tried this vision seemed fine but I dont have any way to know for sure if it worked but when I try to unally people the game has a critical error.
-
Vision
-
Events
- Player - Player 1 (Red) types a chat message containing vision as A substring
- Player - Player 2 (Blue) types a chat message containing vision as A substring
- Player - Player 3 (Teal) types a chat message containing vision as A substring
- Player - Player 4 (Purple) types a chat message containing vision as A substring
- Player - Player 5 (Yellow) types a chat message containing vision as A substring
- Player - Player 6 (Orange) types a chat message containing vision as A substring
- Player - Player 7 (Green) types a chat message containing vision as A substring
- Player - Player 8 (Pink) types a chat message containing vision as A substring
- Player - Player 9 (Gray) types a chat message containing vision as A substring
- Player - Player 10 (Light Blue) types a chat message containing vision as A substring
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Triggering player) is an ally of Player[(Integer((Substring((Entered chat string), 8, 9))))]) Equal to True
-
Then - Actions
- Player - Make (Triggering player) treat Player[(Integer((Substring((Entered chat string), 8, 9))))] as an Ally with shared vision
-
Else - Actions
- Player - Make (Triggering player) treat Player[(Integer((Substring((Entered chat string), 8, 9))))] as an Enemy with shared vision
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Ally
-
Events
- Player - Player 1 (Red) types a chat message containing ally as A substring
- Player - Player 2 (Blue) types a chat message containing ally as A substring
- Player - Player 3 (Teal) types a chat message containing ally as A substring
- Player - Player 4 (Purple) types a chat message containing ally as A substring
- Player - Player 5 (Yellow) types a chat message containing ally as A substring
- Player - Player 6 (Orange) types a chat message containing ally as A substring
- Player - Player 7 (Green) types a chat message containing ally as A substring
- Player - Player 8 (Pink) types a chat message containing ally as A substring
- Player - Player 9 (Gray) types a chat message containing ally as A substring
- Player - Player 10 (Light Blue) types a chat message containing ally as A substring
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Triggering player) is giving Player[(Integer((Substring((Entered chat string), 6, 7))))] Shared vision) Equal to True
-
Then - Actions
- Player - Make (Triggering player) treat Player[(Integer((Substring((Entered chat string), 6, 7))))] as an Ally with shared vision
-
Else - Actions
- Player - Make (Triggering player) treat Player[(Integer((Substring((Entered chat string), 6, 7))))] as an Ally
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Unally
-
Events
- Player - Player 1 (Red) types a chat message containing unally as A substring
- Player - Player 2 (Blue) types a chat message containing unally as A substring
- Player - Player 3 (Teal) types a chat message containing unally as A substring
- Player - Player 4 (Purple) types a chat message containing unally as A substring
- Player - Player 5 (Yellow) types a chat message containing unally as A substring
- Player - Player 6 (Orange) types a chat message containing unally as A substring
- Player - Player 7 (Green) types a chat message containing unally as A substring
- Player - Player 8 (Pink) types a chat message containing unally as A substring
- Player - Player 9 (Gray) types a chat message containing unally as A substring
- Player - Player 10 (Light Blue) types a chat message containing unally as A substring
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Triggering player) is giving Player[(Integer((Substring((Entered chat string), 8, 9))))] Shared vision) Equal to True
-
Then - Actions
- Player - Make (Triggering player) treat Player[(Integer((Substring((Entered chat string), 8, 9))))] as an Enemy with shared vision
-
Else - Actions
- Player - Make (Triggering player) treat Player[(Integer((Substring((Entered chat string), 8, 9))))] as an Enemy
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events