Im making kinda of a desert strike map but im having a little trouble showing the spawntimers...
Anyway, there are 2 teams, each team can have 3 players:
So there are 2 spawners at every spawntime now .
Everyspawntimer counts down to zero and restarts at 90 if 6 players in game, at 60 if 4 players ingame, at 30 is 2 players ingame.
Now the thing is... a lot of times the lobby gets messed up becus like example: player 1, 4 and 6 will be in the same team, and my spawntimers are totally lost. so... what i saw in some map online called DS 1338 they just put the spawntimers on the starting locations on the Minimap, which is an awesome solution because i think you dont really have to know which player is in which starting location, it just starts counting down at the start location of the players.
Anyway my Question!:
How did they do it?, is it a custom dialog which displays over hte normal minimap?
Anyone got a global idea of how to fix my problem?
can i reference the timers to the start locations instead of the players themselves?
like, if player starts on starting location 1 show timer 1
Hey, i kinda alrdy figured it out, i have created a custom dialog above the original minimap and put the timers on the positions where the startpositions of the players are located.
what you mentioned was actually kinda the idea, and i already had the leaderboard with players and spawntimers, only thing was that at times it would display the wrong spawntimer for a player. And the reason for that was that the lobby slots and teams arent the same as the ingame positions and teams..
Ah ok. Luckily, if you chose to pursue it, the player number/lobby position issue isn't too hard to handle. One method that I use is to have a trigger that runs on map initialization to sort the players into a variable "TeamMember":
Events
Game - Map initialization
Local Variables
m = 1 <Integer>
n = 1 <Integer>
Conditions
Actions
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
((Picked player) is in (Players on team 1)) == True
Then
Variable - Set TeamMember[1][m] = (Picked player)
Variable - Modify m: + 1
Else
Variable - Set TeamMember[2][n] = (Picked player)
Variable - Modify n: + 1
For example, "TeamMember[2][1] = 6", reads like "The 1st team member of Team 2 is Player 6".
Hey, thnx man ill prolly try that out in the future, ive been messing around with it a lot...
Anyway if your interested, here was my solution:
another desert strike had used it so i recreated it since he had hismap locked :p
oh that's easy to do :p
if you think of map as rectangle and then position dialog on top of minimap with exact minimap's size (and bottom left offsets are easy to set) then scaled point on map will represent point in minimap. (unless UI is affected by resolution)
@Swagblanket: Go
O yeh and! If you know a way to make the spawntime variables showed on the map increase in size, pls tell me!
you didn't said what method you used and you refer to this as "spawntime variables" which is incorrect, those are either dialog's labels or floating text's. to increase size, you mean overtime? otherwise just use bigger font :p
yeh what you said ^ ^
it was pretty easy to plant in although i had to take a dialog tutorial cause im new to the editor.
I want to change the font of the timers(variables) that get displayed on the minimap... i have like a method that calculates all the timers or what you call labels on the minimap for 2 players 4 players and 6 players.
ok, no matter what your "variables" is(variable is memory thing, they don't exist visually in game), your last instruction is probably something like "Set (dialog item) text to (your text)"
Now if in place of your text there is "Format time to text(timer value)" You need to change it to "Style tag (like "<s val="ChatBar">") + Format time to text(timer value) + "</s>".
styles are only way of changing font. you can get them whenever you try to set Text variable, there is a style list
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hey,
Im making kinda of a desert strike map but im having a little trouble showing the spawntimers... Anyway, there are 2 teams, each team can have 3 players:
1st spawner: 30 secs 2nd spawner: 60 secs 3rd spawner 90 secs
So there are 2 spawners at every spawntime now . Everyspawntimer counts down to zero and restarts at 90 if 6 players in game, at 60 if 4 players ingame, at 30 is 2 players ingame.
Now the thing is... a lot of times the lobby gets messed up becus like example: player 1, 4 and 6 will be in the same team, and my spawntimers are totally lost. so... what i saw in some map online called DS 1338 they just put the spawntimers on the starting locations on the Minimap, which is an awesome solution because i think you dont really have to know which player is in which starting location, it just starts counting down at the start location of the players.
Anyway my Question!:
How did they do it?, is it a custom dialog which displays over hte normal minimap? Anyone got a global idea of how to fix my problem? can i reference the timers to the start locations instead of the players themselves? like, if player starts on starting location 1 show timer 1
@Rice87: Go
Just to clarify, you're interested in assigning a timer to each player, then displaying a leaderboard with the player name and corresponding timer?
@Swagblanket: Go
Hey, i kinda alrdy figured it out, i have created a custom dialog above the original minimap and put the timers on the positions where the startpositions of the players are located.
what you mentioned was actually kinda the idea, and i already had the leaderboard with players and spawntimers, only thing was that at times it would display the wrong spawntimer for a player. And the reason for that was that the lobby slots and teams arent the same as the ingame positions and teams..
@Rice87
Ah ok. Luckily, if you chose to pursue it, the player number/lobby position issue isn't too hard to handle. One method that I use is to have a trigger that runs on map initialization to sort the players into a variable "TeamMember":
Events
Game - Map initialization
Local Variables
m = 1 <Integer>
n = 1 <Integer>
Conditions
Actions
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
((Picked player) is in (Players on team 1)) == True
Then
Variable - Set TeamMember[1][m] = (Picked player)
Variable - Modify m: + 1
Else
Variable - Set TeamMember[2][n] = (Picked player)
Variable - Modify n: + 1
For example, "TeamMember[2][1] = 6", reads like "The 1st team member of Team 2 is Player 6".
@Swagblanket: Go
Hey, thnx man ill prolly try that out in the future, ive been messing around with it a lot... Anyway if your interested, here was my solution: another desert strike had used it so i recreated it since he had hismap locked :p
O yeh and! If you know a way to make the spawntime variables showed on the map increase in size, pls tell me! http://imageshack.us/photo/my-images/171/maptimers.jpg/
:D
oh that's easy to do :p if you think of map as rectangle and then position dialog on top of minimap with exact minimap's size (and bottom left offsets are easy to set) then scaled point on map will represent point in minimap. (unless UI is affected by resolution)
you didn't said what method you used and you refer to this as "spawntime variables" which is incorrect, those are either dialog's labels or floating text's. to increase size, you mean overtime? otherwise just use bigger font :p
@Nerfpl: Go
yeh what you said ^ ^ it was pretty easy to plant in although i had to take a dialog tutorial cause im new to the editor. I want to change the font of the timers(variables) that get displayed on the minimap... i have like a method that calculates all the timers or what you call labels on the minimap for 2 players 4 players and 6 players.
Suggestions would be nice... know im grateful ^_^
@Rice87: Go
ok, no matter what your "variables" is(variable is memory thing, they don't exist visually in game),
your last instruction is probably something like "Set (dialog item) text to (your text)"
Now if in place of your text there is "Format time to text(timer value)"
You need to change it to "Style tag (like "<s val="ChatBar">") + Format time to text(timer value) + "</s>".
styles are only way of changing font. you can get them whenever you try to set Text variable, there is a style list