| 04-30-2005, 12:17 AM | #1 |
ok Im doing this king of the hill kind of thing when a unit enters a region, then a leaderboard displaying their time will increase every second they are in the region... ok this is my problem: 1. once the enters the region it only gets to 1 second and stops there. 2. if it could keep going its will display a time such as "205" seconds... id rather have it like "3:25" thanks |
| 04-30-2005, 11:01 AM | #2 |
showing the trigger you have now would help ... |
| 04-30-2005, 04:01 PM | #3 |
ok well first is the leaderboard thing (it gets ran by another trigger): creating the leaderboard Events Conditions Actions Leaderboard - Destroy KillerLeader Leaderboard - Create a leaderboard for (All players) titled Time In Pond Set PondLeader = (Last created leaderboard) Player Group - Pick every player in (All players) and do (If (((Picked player) slot status) Equal to Is playing) then do (Leaderboard - Add (Picked player) to PondLeader with label (Name of (Picked player)) and value 0) else do (Do nothing)) Leaderboard - Sort PondLeader by Value in Descending order Leaderboard - Show PondLeader For each (Integer A) from 1 to 12, do (Set TimeInPond[(Integer A)] = 0) This trigger makes the time go up: gaining time Events Unit - A unit enters Hill <gen> Conditions (Triggering unit) Equal to (Entering unit) Actions Wait 1.00 seconds Set TimeInPond[(Player number of (Owner of (Triggering unit)))] = (TimeInPond[(Player number of (Owner of (Triggering unit)))] + 1) Leaderboard - Change the value for (Owner of (Triggering unit)) in PondLeader to TimeInPond[(Player number of (Owner of (Triggering unit)))] Leaderboard - Sort PondLeader by Value in Descending order and there those are the triggers |
| 04-30-2005, 05:16 PM | #4 | |
Quote:
see, take a look at "gaining time", the event is 'unit - a unit entires region' <-- this means that this trigger will run ONLY when a unit enters the region, NOT as long as the unit is in the region you will have to do a periodical check of some sort, or a recursive trigger (ignore that if the jargon throws you), i'll leave that up to you unless you need more help, then give a holler and as for putting it in time form X:XX, you can't do that in the value part of a leaderboard, since you may only put an integer there, you can do it with a multiboard though |
| 04-30-2005, 05:22 PM | #5 |
well umm finding the recursive trigger is what i had trouble with.... wanna help me with that? |
| 04-30-2005, 05:31 PM | #6 | |
Quote:
hows this for a start Code:
event:
Time - every (variable) seconds
conditions:
actions: |
| 04-30-2005, 07:50 PM | #7 |
Guest | As for the leaderboard time, have a trigger that says if there is 60 seconds remove 60 seconds from whatever variable you use and add 1 minute to another variable. Then on the leaderboard show (vMins):(vSecs). I'm not sure if you would need a multiboard for this. |
| 04-30-2005, 09:26 PM | #8 | |
Quote:
but how would i make it so time only goes up when youre in the location? |
| 04-30-2005, 09:40 PM | #9 |
For the first trigger "creating the leaderboard" make it A Unit Enters Hill <gen>. Then it will create the leaderboard with the gaining time trigger. Edit : Also at the end of creating the leaderboard do Trigger - Turn on gaining time and make sure gaining time is off in worldedit so when you enter hill the gain time trigger will start the leaderboard. |
