I'm trying to make a guessing game trigger, like in Kodo Tag, but I can't find a way to make it so they can't play if they have under 50 gold. Heres what I have so far:
Trigger:
Jail Game
Events
Player - Player 1 (Red) types a chat message containing -guess as A substring
Player - Player 2 (Blue) types a chat message containing -guess as A substring
Player - Player 3 (Teal) types a chat message containing -guess as A substring
Player - Player 4 (Purple) types a chat message containing -guess as A substring
Player - Player 5 (Yellow) types a chat message containing -guess as A substring
Player - Player 6 (Orange) types a chat message containing -guess as A substring
Player - Player 7 (Green) types a chat message containing -guess as A substring
Player - Player 8 (Pink) types a chat message containing -guess as A substring
Player - Player 9 (Gray) types a chat message containing -guess as A substring
Player - Player 10 (Light Blue) types a chat message containing -guess as A substring
Conditions
Actions
Player - Set Player 1 (Red) Current gold to ((Player 1 (Red) Current gold) - 50)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Get Triggering Player State) Equal to Current gold
Then - Actions
Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Unit-type of (Picked unit)) Equal to Runner (1)
(Unit-type of (Picked unit)) Equal to Runner (2)
(Unit-type of (Picked unit)) Equal to Runner (3)
(Unit-type of (Picked unit)) Equal to Runner (4)
Then - Actions
Set Guess = ((Entered chat string) + (8 + 9))
Set Random = (String((Random integer number between 1 and 10)))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Guess Equal to Random
Then - Actions
Game - Display to (All allies of Player 1 (Red)) the text: ((Name of (Triggering player)) + has guessed the random number! He wins 100 gold!)
Player - Add 100 to (Triggering player) Current gold
Else - Actions
Player Group - Pick every player in (All players controlled by a ((Triggering player) controller) player) and do (Player - Set (Triggering player) Current gold to ((Player 1 (Red) Current gold) - 50))
Else - Actions
Player Group - Pick every player in (All players controlled by a ((Triggering player) controller) player) and do (Game - Display to (All players matching ((Triggering player) Equal to (Picked player))) the text: Must be in jail to ...)