Post by Sunny_D on Nov 6, 2005 15:23:53 GMT 1
ok, as i am asked this a lot, i decided to make a tutorial on how to setup simply a Rank-System. This is basically for b.net map for more players.
in following i make a sentence or a word in color and then i explain that in same color below. examples will be in green color.
[I used lumber for my kills, but you can even set a integer-variable array for that, this may be explained in another variable-tutorial. if you use like me lumber for your kills, be sure u dont use lumber for building too.
NOTE: maybe you better read the variable-tutorial on this forum linked here:]
to variable tutorial: w3dragons.proboards51.com/index.cgi?board=tutorials&action=display&thread=1121086098
OK, here we go:
1) declare the variables:
we need:
- a string variable [array] i call it TypeRank[] with an array-size of the maximum amount of players in the map. one number for each player.
FE: TypeRank[5] is the rank for Player(5)
- a string variable [array] i call it OrigName[] with an array-size of the maximum amount of players in the map. Here i save the original name of the player at beginning of the map.
>I use size 10 because on my map can play max 10 players.<
2) the trigger(s): i show you the trigger for one rank, for the other triggers replace the settings for the things i wrote in yellow color. They are - except the yellow fields - the same triggers.
>>>>TRIGGER 1<<<<
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Player((Integer A))) controller) Equal to User
Then - Actions
Set OrigNamePlayer[(Integer A)] = (Name of (Player((Integer A))))
Else - Actions
>>>>TRIGGER 2<<<<
Events
Player - Player 1 (Red)'s Current lumber becomes Greater than or equal to 500.00
Player - Player 2 (Blue)'s Current lumber becomes Greater than or equal to 500.00
Player - Player 3 (Teal)'s Current lumber becomes Greater than or equal to 500.00
Player - Player 4 (Purple)'s Current lumber becomes Greater than or equal to 500.00
Player - Player 5 (Yellow)'s Current lumber becomes Greater than or equal to 500.00
Player - Player 6 (Orange)'s Current lumber becomes Greater than or equal to 500.00
Player - Player 7 (Green)'s Current lumber becomes Greater than or equal to 500.00
Player - Player 8 (Pink)'s Current lumber becomes Greater than or equal to 500.00
Player - Player 9 (Gray)'s Current lumber becomes Greater than or equal to 500.00
Player - Player 10 (Light Blue)'s Current lumber becomes Greater than or equal to 500.00
Conditions
And - All (Conditions) are true
Conditions
((Triggering player) slot status) Equal to Is playing
(Real(((Triggering player) Current lumber))) Less than 1000.00
Actions
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Triggering player) Equal to Player(Integer A)
TypeRank[(Integer A)] Not equal to LCpl
Then - Actions
Set TypeRank[(Integer A)] = LCpl
Game - Display to (All players) for 20.00 seconds the text: ((Name of Player(Integer A)) + has been promoted to Lance Corporal. Congratulations.)
Player - Set name of Player(Integer A) to (TypeRank[(Integer A)] + OrigName(Integer A))
Else - Actions
Well, thats it. Now i explain the colored text-passages:
>>> this is the maximum amount of kills for that rank: more precisely: you get this rank at 500 kills and at 1000 your next highest rank starts on next trigger.
>>> this is a string-comparison-condition. this is an important part! dont forget it.
Hope that could help you a bit if you need such a rank-system.
If you have questions - feel free to post them here.
in following i make a sentence or a word in color and then i explain that in same color below. examples will be in green color.
[I used lumber for my kills, but you can even set a integer-variable array for that, this may be explained in another variable-tutorial. if you use like me lumber for your kills, be sure u dont use lumber for building too.
NOTE: maybe you better read the variable-tutorial on this forum linked here:]
to variable tutorial: w3dragons.proboards51.com/index.cgi?board=tutorials&action=display&thread=1121086098
OK, here we go:
1) declare the variables:
we need:
- a string variable [array] i call it TypeRank[] with an array-size of the maximum amount of players in the map. one number for each player.
FE: TypeRank[5] is the rank for Player(5)
- a string variable [array] i call it OrigName[] with an array-size of the maximum amount of players in the map. Here i save the original name of the player at beginning of the map.
>I use size 10 because on my map can play max 10 players.<
2) the trigger(s): i show you the trigger for one rank, for the other triggers replace the settings for the things i wrote in yellow color. They are - except the yellow fields - the same triggers.
>>>>TRIGGER 1<<<<
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Player((Integer A))) controller) Equal to User
Then - Actions
Set OrigNamePlayer[(Integer A)] = (Name of (Player((Integer A))))
Else - Actions
>>>>TRIGGER 2<<<<
Events
Player - Player 1 (Red)'s Current lumber becomes Greater than or equal to 500.00
Player - Player 2 (Blue)'s Current lumber becomes Greater than or equal to 500.00
Player - Player 3 (Teal)'s Current lumber becomes Greater than or equal to 500.00
Player - Player 4 (Purple)'s Current lumber becomes Greater than or equal to 500.00
Player - Player 5 (Yellow)'s Current lumber becomes Greater than or equal to 500.00
Player - Player 6 (Orange)'s Current lumber becomes Greater than or equal to 500.00
Player - Player 7 (Green)'s Current lumber becomes Greater than or equal to 500.00
Player - Player 8 (Pink)'s Current lumber becomes Greater than or equal to 500.00
Player - Player 9 (Gray)'s Current lumber becomes Greater than or equal to 500.00
Player - Player 10 (Light Blue)'s Current lumber becomes Greater than or equal to 500.00
Conditions
And - All (Conditions) are true
Conditions
((Triggering player) slot status) Equal to Is playing
(Real(((Triggering player) Current lumber))) Less than 1000.00
Actions
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Triggering player) Equal to Player(Integer A)
TypeRank[(Integer A)] Not equal to LCpl
Then - Actions
Set TypeRank[(Integer A)] = LCpl
Game - Display to (All players) for 20.00 seconds the text: ((Name of Player(Integer A)) + has been promoted to Lance Corporal. Congratulations.)
Player - Set name of Player(Integer A) to (TypeRank[(Integer A)] + OrigName(Integer A))
Else - Actions
Well, thats it. Now i explain the colored text-passages:
>>> this is the maximum amount of kills for that rank: more precisely: you get this rank at 500 kills and at 1000 your next highest rank starts on next trigger.
>>> this is a string-comparison-condition. this is an important part! dont forget it.
Hope that could help you a bit if you need such a rank-system.
If you have questions - feel free to post them here.