December 05, 2023, 04:01:12 pm

The Gang Garrison 2 Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

NOTICE: Due to a rise in bot activity, new posters need to be approved before posting.

Join the community Discord server!

Pages: [1]

Author Topic: No timer overfill  (Read 2420 times)

NAGN

  • Developer
  • ******
  • Karma: 146
  • Offline Offline
  • Posts: 16382
  • Yeah so now I have an idea
No timer overfill
« on: July 29, 2012, 10:17:01 pm »

I don't want to play thundermountain for 18 minutes, so I wrote a quick plugin which checks to see if it goes over the time limit, and resyncs and corrects it back

Code: (Game Maker Language) [Select]
object_event_add(GameServer, ev_step, ev_step_begin, '
if instance_exists(ControlPointHUD) {
    if (ControlPointHUD.timer > global.timeLimitMins*1800) {
        ControlPointHUD.timer = global.timeLimitMins*1800;
        GameServer.syncTimer = 1;
       
    }
}
')
« Last Edit: August 22, 2012, 12:54:29 am by NAGN »
Logged

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12699
  • Another one --
Re: No timer overfill
« Reply #1 on: August 22, 2012, 12:22:08 am »

I approve
pls add a code block though, it would make casual reading of the code easier
it's one of the reasons I recommend using the code block in the FAQ
at least I think I do
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters
Pages: [1]
 

Page created in 0.033 seconds with 37 queries.