September 04, 2025, 12:50:35 pm

The Gang Garrison 2 Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

NOTICE: Wondering where all the forums have gone?

Join the community Discord server!

Pages: 1 2 3 [4]

Author Topic: FreezeTime [UPDATED: No Escape Edition]  (Read 19968 times)

notarctic

  • just arctic, what gives?
  • ******
  • Karma: 8
  • Offline Offline
  • Posts: 4864
  • 👎👀 bad aim ba̷̶ ԁ aIm 👎 thats❌ some bad 👎👎aim
Logged
[1:37:51 PM] Derpduck: arctic u need to quote ppl that make shit posts in case they edit them
[4:20:15 PM] Rubeus Hashgrid: i cant discover anything fuck you imageshack

hippie

  • Lucky Member
  • *******
  • Karma: 5
  • Offline Offline
  • Posts: 1084
Re: FreezeTime [UPDATED: No Escape Edition]
« Reply #46 on: April 04, 2014, 11:03:36 am »

what would I type in my gg2.ini for this to work when I host?
Logged

Derpduck

  • 2011 Haxxy Finalist
  • *
  • Karma: 42
  • Offline Offline
  • Posts: 5752
Re: FreezeTime [UPDATED: No Escape Edition]
« Reply #47 on: April 04, 2014, 11:04:48 am »

This isn't a server sent plugin, so you just need to put it in the plugins folder.

notarctic

  • just arctic, what gives?
  • ******
  • Karma: 8
  • Offline Offline
  • Posts: 4864
  • 👎👀 bad aim ba̷̶ ԁ aIm 👎 thats❌ some bad 👎👎aim
Re: FreezeTime [UPDATED: No Escape Edition]
« Reply #48 on: April 04, 2014, 05:40:11 pm »

It also dosnt work right now
Logged
[1:37:51 PM] Derpduck: arctic u need to quote ppl that make shit posts in case they edit them
[4:20:15 PM] Rubeus Hashgrid: i cant discover anything fuck you imageshack

notarctic

  • just arctic, what gives?
  • ******
  • Karma: 8
  • Offline Offline
  • Posts: 4864
  • 👎👀 bad aim ba̷̶ ԁ aIm 👎 thats❌ some bad 👎👎aim
Re: FreezeTime [UPDATED: No Escape Edition]
« Reply #49 on: June 26, 2014, 02:06:35 am »

hi guys im bumping this to update this thingy

(click to show/hide)
Logged
[1:37:51 PM] Derpduck: arctic u need to quote ppl that make shit posts in case they edit them
[4:20:15 PM] Rubeus Hashgrid: i cant discover anything fuck you imageshack

Machidro

  • 2013 Haxxy Award Winner
  • *
  • Karma: 5
  • Offline Offline
  • Posts: 1672
  • Gardicolo time is over.
Re: FreezeTime [UPDATED: No Escape Edition]
« Reply #50 on: July 30, 2014, 09:38:47 pm »

OP updated to the correct version. Thanks Artic.
Logged
A CHALLENGER HAS ARRIVED.

Twelve

  • Junior Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 112
  • get good, get lmaobox
    • http://gifmansion.com/2977/rainbowfrog
Re: FreezeTime [UPDATED: No Escape Edition]
« Reply #51 on: October 16, 2014, 12:09:31 am »

is this suppose too happen or i didnt read an update someone posted on this (in attachment k)
Logged

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12519
  • Another one --
Re: FreezeTime [UPDATED: No Escape Edition]
« Reply #52 on: October 16, 2014, 12:21:57 am »

did you get stuck in the floor
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

Derpduck

  • 2011 Haxxy Finalist
  • *
  • Karma: 42
  • Offline Offline
  • Posts: 5752
Re: FreezeTime [UPDATED: No Escape Edition]
« Reply #53 on: October 16, 2014, 02:11:06 am »

You can get stuck in the floor on maps with horizontal gates on stairs like that if you run into them during freezetime.

pandaturds

  • Full Member
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 224
  • gg2oomer
Re: FreezeTime [UPDATED: No Escape Edition]
« Reply #54 on: May 01, 2020, 07:29:23 am »

When I tried using this plugin it went twice as fast as it did not account for the server's FPS (60 in my case).

Attached fix will make this work on both 30 or 60 fps by checking global.game_fps.
Logged
r.i.p [AT] / [THA]
bird goes tweet

Machidro

  • 2013 Haxxy Award Winner
  • *
  • Karma: 5
  • Offline Offline
  • Posts: 1672
  • Gardicolo time is over.
Re: FreezeTime [UPDATED: No Escape Edition]
« Reply #55 on: August 13, 2020, 12:03:01 am »

When I tried using this plugin it went twice as fast as it did not account for the server's FPS (60 in my case).

Attached fix will make this work on both 30 or 60 fps by checking global.game_fps.

Thanks pandaturds! I've updated the OP to include your changes as part of recent fixes to support 2.9.2 map voting
Logged
A CHALLENGER HAS ARRIVED.

Derpduck

  • 2011 Haxxy Finalist
  • *
  • Karma: 42
  • Offline Offline
  • Posts: 5752
Re: FreezeTime [UPDATED: No Escape Edition]
« Reply #56 on: December 11, 2020, 03:18:22 pm »

I had a quick go at updating this plugin just to make some minor improvements while it's still in use:
Fixed some indenting issues/improved code readability
Improved method for blocking players from team doors, using the updated collision code methods
Removed various redundancies
Improved gamemode checking and added compatibility for invasion mode

It is now much harder to accidently get stuck on maps like ctf_noir, I had to really intentionally try to get stuck for it to happen.

Code: [Select]
//change the 10's in the below hud create events to however many seconds you want your map to have locked doors.

//we have to assign these hud values individually because all of the below override HUD's //create event.
// we still need to announce arena so that we can join servers playing arena without crashing


object_event_add(CTFHUD,ev_create,0, 'global.TimeLeftTillStart=10*global.game_fps ');
object_event_add(GeneratorHUD,ev_create,0, 'global.TimeLeftTillStart=10*global.game_fps ');
object_event_add(KothHUD,ev_create,0, 'global.TimeLeftTillStart=10*global.game_fps ');
object_event_add(DKothHUD,ev_create,0, 'global.TimeLeftTillStart=10*global.game_fps ');
object_event_add(ControlPointHUD,ev_create,0, 'global.TimeLeftTillStart=10*global.game_fps ');

//leave at zero, arena needs no wait. We need to declare this to prevent a crash if you join an arena match as a client.
object_event_add(ArenaHUD,ev_create,0, 'global.TimeLeftTillStart=0');

//If the time left isnt up, decrement the timer and ensure that teamgates are solid.
//Otherwise, unlock the gates.

object_event_add(HUD,ev_step,ev_step_begin,'

//run only as host.
if (global.isHost)
{

//decrease time left
if instance_exists(CTFHUD) or instance_exists(InvasionHUD) or instance_exists(KothHUD) or instance_exists(GeneratorHUD) or instance_exists(DKothHUD){
if global.TimeLeftTillStart>0 {
global.TimeLeftTillStart-=1;
}
} else if instance_exists(ControlPointHUD) {
if global.TimeLeftTillStart>0 {
global.TimeLeftTillStart-=1;

//if we are playing AD/CP (or map voting, shameless compatibility plug), no wait to start. If you want a map to not to have a time limit
//on startup, just add another OR check with your maps name.
if (ControlPointHUD.mode==0 or string_pos("map_voting", string_lower(global.currentMap)) != 0)
{
global.TimeLeftTillStart=0;
}
}
}

//Now that weve ensured its solid, make announcements every second so players know whats going on.
if global.TimeLeftTillStart>0 and global.TimeLeftTillStart mod global.game_fps = 0
{
ServerMessageString("Spawn doors will open in " + string(round(global.TimeLeftTillStart/global.game_fps)) + " seconds.",global.sendBuffer);
with NoticeO instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = "Spawn doors will open in " + string(round(global.TimeLeftTillStart/global.game_fps)) + " seconds.";
}
//announce opening at one instead of zero so that we dont need another variable to say weve already announced this
else if global.TimeLeftTillStart=1
{
ServerMessageString("Spawn doors are open! Fight!",global.sendBuffer);
with NoticeO instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = "Spawn doors are open! Fight!";

//refill game timers based on game mode.
if instance_exists(CTFHUD) {
CTFHUD.timer=CTFHUD.timeLimit;
}
if instance_exists(InvasionHUD) {
InvasionHUD.timer=InvasionHUD.timeLimit;
}
if instance_exists(ControlPointHUD) {
ControlPointHUD.timer=ControlPointHUD.timeLimit;
}
if instance_exists(DKothHUD) {
DKothHUD.cpUnlock=900;
}
if instance_exists(KothHUD) {
KothHUD.cpUnlock=900;
}
if instance_exists(GeneratorHUD) {
GeneratorHUD.timer=GeneratorHUD.timeLimit;
}
GameServer.syncTimer=1
}
}
//if you arent the host, set the timers to zero. This means that the actual hosts numbers wont overlap with yours or desync, and that you wont get
//trapped on doors when walking through them, and that you wont get random messages when entering lobbies as a client.
else
{
if global.TimeLeftTillStart!=0 {
global.TimeLeftTillStart=0;
}
}
');

//Make gates solid during setup time
object_event_add(Character,ev_collision,TeamGate,'
if global.TimeLeftTillStart>0 {
TeamGate.solid=true
}
');
« Last Edit: December 11, 2020, 03:23:26 pm by Derpduck »
Logged
Pages: 1 2 3 [4]
 

Page created in 0.036 seconds with 32 queries.