LVZ/LVL Questions - wow..step 2 rahXephon - Fri Apr 11, 2003 7:47 pm Post subject: wow..step 2
lol i got my scoreboard working (thanks Dr.) but... i cant go higher than 9 secs...for a count down :X
if (countdown[0] > 0) { String s = "*objon "; s += countdown[0];
sendPublic(s);
String s2 = "*objoff "; s2 += countdown[0] + 1;
sendPublic(s2);
}
}
only displays each of them seperatly in each colum
ex: lets say i am counting down from 60 secs
it would start in the score spot of 60 which in lvz format is 0...for the first colum in the score area. Is there anyway i can fix this?
Doggeti - Fri Jun 13, 2003 11:33 am Post subject:
Well, for this you have to use some maths. countdown[x] only contains one number. if you want to count down 1 minute you have to set countdown[x] to 60 (60 seconds). If your game should last 15 minutes you have to set countdown[x] to 15 * 60 = 900.
OK, until now it's easy. The next part of the job is more difficult. since countdown[x] only holds the number of seconds you have to calculate the number of minutes and seconds out of countdown[x].
1.
ok, lets calculate now:
first lets get the minutes
mins = int(countdown[x] / 60)
ok, how many seconds are these minutes?
minsInSeconds = mins * 60
finally let's see how many seconds are left
secs = countdown[x] - minsInSeconds
i hope you understand everything till now.
2.
now, next step. divide the minutes and seconds in 1- and 10-digits:
tenMins = int(mins / 10)
oneMins = mins - int(mins / 10) * 10
3.
Phew, not so easy. But be happy, we are nearly finished. Finally you have to convert the tenMins, oneMins, tenSecs and oneSecs to the object ids and turn them on/off.
in your case do this:
tenMins + 1
oneMins + 10
tenSecs + 20
oneSecs + 30
For the score it is very similar. i'm sure you will figure that out by yourself.
Anonymous - Tue Jun 17, 2003 12:00 am Post subject:
this look awful lot like the scoreboard in sscx wzw ?
SuSE - Tue Jun 17, 2003 2:38 pm Post subject:
Anonymous wrote:
this look awful lot like the scoreboard in sscx wzw ?
?
Shuko - Fri Jul 04, 2003 6:26 pm Post subject:
Actually that is the scoreboard me and Xviper made for Premier League. The blue boxes between time and score are meant for squad's names, well 3 chars of them. In practice matches 100 and 200 (the freqs of the teams) were used.