Hi after long time i start to play with editor and am stuck at this a bit complicated trigger i think all works but i can get gold when group 1 or 2 win
if anyone can see problem pls...if you need more question, yeah is a kind of lottery system that am testing for now only for 1 player but am playing like with min 3+me and max 11+me players...hope that helps...btw add gold is integer i try to convert to real same...
begining
if anyone can see problem pls...if you need more question, yeah is a kind of lottery system that am testing for now only for 1 player but am playing like with min 3+me and max 11+me players...hope that helps...btw add gold is integer i try to convert to real same...
begining
-
install
-
Events
- Map initialization
- Conditions
-
Actions
- Player - Set Player 1 (Red) Current gold to 200
-
Events
-
start
-
Events
- Player - Player 1 (Red) types a chat message containing go as An exact match
-
Conditions
- (Entered chat string) Equal to go
-
Actions
- Set totalplayers = (Random integer number between 3 and 11)
- Set TotalGold = (((totalplayers + 1) x 50) - 50)
- Game - Display to (All players) for 15.00 seconds the text: ((((Total players are + (String((totalplayers + 1)))) + and total gold is ) + (String(TotalGold))) + , vote please 1 or 2 (just type).)
- Set NumWingroup = (Random integer number between 1 and 2)
- Set trigger = 1
- Player - Add -50 to Player 1 (Red) Current gold
- Trigger - Turn off (This trigger)
-
Events
-
finish
-
Events
- Player - Player 1 (Red) types a chat message containing 1 as An exact match
- Player - Player 1 (Red) types a chat message containing 2 as An exact match
-
Conditions
- trigger Equal to 1
-
Actions
- Set playersgroup1 = (totalplayers - (Random integer number between 0 and totalplayers))
- Set playersgroup2 = (totalplayers - playersgroup1)
- Game - Display to (All players) the text: (total players in group 1 are + (String(playersgroup1)))
- Wait 2.00 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Entered chat string) Equal to 1
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- NumWingroup Equal to 1
-
Then - Actions
- Set givegold = ((playersgroup1 + 1) / TotalGold)
- Player - Add givegold to Player 1 (Red) Current gold
- Game - Display to (All players) the text: (You just won + (((String(givegold)) + cuz group ) + ((String(NumWingroup)) + (won with + ((String((playersgroup1 + 1))) + (players, out of + (String((totalplayers + 1)))))))))
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- NumWingroup Equal to 2
-
Then - Actions
- Game - Display to (All players) for 15.00 seconds the text: (((((Victory group is + (String(NumWingroup))) + with ) + (String(playersgroup1))) + players, and oposit group have) + (String((playersgroup2 + 1))))
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Entered chat string) Equal to 2
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- NumWingroup Equal to 1
-
Then - Actions
- Game - Display to (All players) for 15.00 seconds the text: (((((Victory group is + (String(NumWingroup))) + with ) + (String(playersgroup2))) + players, and oposit group have) + (String((playersgroup1 + 1))))
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- NumWingroup Equal to 2
-
Then - Actions
- Set givegold = ((playersgroup2 + 1) / TotalGold)
- Player - Add givegold to Player 1 (Red) Current gold
- Game - Display to (All players) the text: (You just won + (((String(givegold)) + cuz group ) + ((String(NumWingroup)) + (won with + ((String((playersgroup2 + 1))) + (players, out of + (String((totalplayers + 1)))))))))
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
- Set trigger = 0
- Trigger - Turn on start <gen>
-
Events