HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need help making a trigger

09-17-2010, 06:28 PM#1
BEeeH-
Hey, some weeks ago ive got a Sheep Tag map by a friend. And i'm now editing it.

In sheeptag we play in rounds. When the sheeps died = It's the wolves turn to be sheeps.
So after each round played as Sheep you get +1 on the SheepRound count. And theres a mode called -fair which makes it fair.

For example;

SheepRounds
BEeeH- 1
pro_sheep 1
wolf_master 0
ilovecookies 0

If you do the -fair mode after Beeeh's and pro_sheep's round. = wolfmaster and ilovecookies will be sheep this round. But theres a problem!..
When everyone played the same amount of sheeprounds, for example 1, 1, 1, 1, The teams will be randomized and theres big chances u get the same sheep ally!:S

I want to make a trigger which makes a mode that's almost as the -fair mode. But makes you get different sheep allies! But still fair! :S

So can you guys please help me to make this trigger? Because im not that good at mapmaking! :S

Here's the -fair trigger

Trigger:
ModeFair
Collapse Events
Player - Player 1 (Red) types a chat message containing -fair as A substring
Player - Player 2 (Blue) types a chat message containing -fair as A substring
Player - Player 3 (Teal) types a chat message containing -fair as A substring
Player - Player 4 (Purple) types a chat message containing -fair as A substring
Player - Player 5 (Yellow) types a chat message containing -fair as A substring
Player - Player 6 (Orange) types a chat message containing -fair as A substring
Player - Player 7 (Green) types a chat message containing -fair as A substring
Player - Player 8 (Pink) types a chat message containing -fair as A substring
Player - Player 9 (Gray) types a chat message containing -fair as A substring
Player - Player 10 (Light Blue) types a chat message containing -fair as A substring
Player - Player 11 (Dark Green) types a chat message containing -fair as A substring
Player - Player 12 (Brown) types a chat message containing -fair as A substring
Collapse Conditions
(Triggering player) Equal to GameController
(Substring((Entered chat string), 1, 5)) Equal to -fair
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Integer((Substring((Entered chat string), 7, (Length of (Entered chat string)))))) Less than ((Number of players in SheepPlayers) + (Number of players in WolfPlayers))
(Integer((Substring((Entered chat string), 7, (Length of (Entered chat string)))))) Greater than or equal to 1
Collapse Then - Actions
Set TempInt1 = (Integer((Substring((Entered chat string), 7, 8))))
Player Group - Remove all players from SheepPlayers
Collapse Player Group - Pick every player in (All players matching (((Matching player) slot status) Equal to Is playing)) and do (Actions)
Collapse Loop - Actions
Player Group - Add (Picked player) to WolfPlayers
Collapse For each (Integer A) from 0 to NumberofRounds, do (Actions)
Collapse Loop - Actions
Collapse For each (Integer B) from 1 to 12, do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Number of players in SheepPlayers) Less than TempInt1
Collapse Then - Actions
Set TempPlayer = (Random player from (All players matching ((((Matching player) is in WolfPlayers) Equal to True) and (NumberofSheepRounds[(Player number of (Matching player))] Equal to (Integer A)))))
Player Group - Remove TempPlayer from WolfPlayers
Player Group - Add TempPlayer to SheepPlayers
Else - Actions
Set GameMode = Random
Trigger - Run ChooseModeEnd <gen> (checking conditions)
Player Group - Pick every player in WolfPlayers and do (Player - Add TempInt6 to (Picked player) Current gold)
Player Group - Pick every player in SheepPlayers and do (Player - Add TempInt7 to (Picked player) Current gold)
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Entered chat string) Equal to -fair
Collapse Then - Actions
Set TempInt1 = ((Number of players in WolfPlayers) / 2)
Player Group - Remove all players from SheepPlayers
Collapse Player Group - Pick every player in (All players matching (((Matching player) slot status) Equal to Is playing)) and do (Actions)
Collapse Loop - Actions
Player Group - Add (Picked player) to WolfPlayers
Collapse For each (Integer A) from 0 to NumberofRounds, do (Actions)
Collapse Loop - Actions
Collapse For each (Integer B) from 1 to 12, do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Number of players in SheepPlayers) Less than TempInt1
Collapse Then - Actions
Set TempPlayer = (Random player from (All players matching ((((Matching player) is in WolfPlayers) Equal to True) and (NumberofSheepRounds[(Player number of (Matching player))] Equal to (Integer A)))))
Player Group - Remove TempPlayer from WolfPlayers
Player Group - Add TempPlayer to SheepPlayers
Else - Actions
Set GameMode = Random
Trigger - Run ChooseModeEnd <gen> (checking conditions)
Else - Actions
09-18-2010, 07:18 PM#2
DioD
use ELO rating, wikipedia contain "how to" instructions.

also this cannot be done in this way, you must keep data about prevous selections.