There must be some way, JaGeX made castlewars have a 20 minute timer which is global.
|
|
For example if i was to make castlewars and i wanted an int for the time as 1200.
To prevent each user logging on and the timer being unique to them, so it may be 1200 for them but 500 for another person.
How would i make a global int, so the number is the same for everyone?
There must be some way, JaGeX made castlewars have a 20 minute timer which is global.
I know, but that would still be differant for each user.
Right say for example player x logs on.
Timer 1 starts on 1000 and decreases by 1 each second.
30 seconds later Player x's Timer 1 is on 970, however player y logs on, but timer 1 would be 1000 for him, and timer 1 for player x would be 970.

or.. each person can have their own seperate int, but they all start the game at the same time.
So playerHandler is basically run via the server.
So if i made
Timer1 = 1200;
and made the timer1 decrease by 1 each second.
If player x logs on, then 30 seconds later when player y logs on, although player x's timer1 will now be 970, so will player x's?
Alright if it works thankz.
Also, if i was to call a method in PlayerHandler, would it call it for everyone?
For example if the method in playerHandler contained "teleportToX = xxxx" and i called it, would everyone get teleported to xxxx?
Last edited by Stanyer; 01-09-2008 at 11:51 PM. Reason: Double posting is not allowed!
mr s'sock, static makes the object (variable/method), able to be called upon in any class, without having to define it again.
| « How do you find out the sendQuest ID of a certain line? | RuneLimit ™ » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |