Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
wow..step 2

 
Post new topic   Reply to topic Printable version
 View previous topic  Ship Radiuses Post :: Post Coloring help  View next topic  
Author Message
rahXephon
Novice


Age:39
Gender:Gender:Male
Joined: Mar 14 2003
Posts: 31
Location: USA NY
Offline

PostPosted: Fri Apr 11, 2003 7:47 pm    Post subject: wow..step 2 Reply to topic Reply with quote

lol i got my scoreboard working (thanks Dr.) but... i cant go higher than 9 secs...for a count down :X



what my problem is, is that the code i have:

Code: Show/Hide
   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?




img.png - 13.69 KB
File downloaded or viewed 65 time(s)
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Doggeti
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Jan 12 2003
Posts: 297
Location: Germany
Offline

PostPosted: Fri Jun 13, 2003 11:33 am    Post subject: Reply to topic Reply with quote

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

tenSecs = int(secs / 10)
oneSecs = secs - 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.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Guest



Offline

PostPosted: Tue Jun 17, 2003 12:00 am    Post subject: Reply to topic Reply with quote

this look awful lot like the scoreboard in sscx wzw ?
Back to top
SuSE
Me measures good


Joined: Dec 02 2002
Posts: 2307
Offline

PostPosted: Tue Jun 17, 2003 2:38 pm    Post subject: Reply to topic Reply with quote

Anonymous wrote:
this look awful lot like the scoreboard in sscx wzw ?


?
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
Shuko
Newbie


Joined: Jul 04 2003
Posts: 2
Offline

PostPosted: Fri Jul 04, 2003 6:26 pm    Post subject: Reply to topic Reply with quote

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.
Back to top
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> LVZ/LVL Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 90 page(s) served in previous 5 minutes.

phpBB Created this page in 0.447024 seconds : 31 queries executed (93.6%): GZIP compression disabled