March 29, 2023, 11:46:39 am

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: Respawn waves [Serverplugin]  (Read 3520 times)

Lorgan

  • Retired Randomizer Mod Developer
  • Resident Miku
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 3657
    • My own website
Respawn waves [Serverplugin]
« on: July 03, 2012, 12:29:18 pm »

the plugin should use the stock respawn time option as the base time and have a configurable wave length
so if I have a respawn time of 7 and a wave time of 3 then the spawns should be from 7 to 10 seconds long in order to be in sync
spawn waves should be initiated with the first person to die getting the longest respawn time, and the next X seconds (wave length) each getting shorter ones until the wave length is over. once that period is over it's irrelevant and the next death gets the longest spawn time again. TF2 does something different but I find this superior.
example:
respawn 7, wave 3
person A dies one frame after s10
B dies at s11
C dies at s11
D dies at s13 precisely
E dies two frames after s13
F dies at s15
A, B, C, D respawn one frame after s20
E, F respawn two frames after s23
whoever makes a good implementation of this first will have their plugin stickied.

Code: [Select]
//respawn waves server plugin
//made by Lorgan

//Minimum respawn time is the regular respawn time
//Maximum respawn time is the regular respawn time + the wave interval

ini_open("gg2.ini");
global.wave_time = ini_read_real("Plugins","Wave_time",3);
ini_close();

object_event_add(HostOptionsController,ev_create,0,'
    wave_section = "Plugins";
    wave_key = "Wave_time";
   
    menu_addedit_num("Wave interval (secs):", "global.wave_time", "gg2_write_ini(wave_section, wave_key, argument0);");
');

//Increase the base respawn time with the wave time. This is the maximum respawn time.
object_event_add(Character,ev_destroy,0,"
    if global.isHost && player.alarm[5] > 1 player.alarm[5] += global.wave_time*30;
");

//Allow all players that fall within the wave interval to spawn too.
//This will make the respawn time 1 frame shorter. Don't care about that.
object_event_add(Player,ev_step,ev_step_normal,"
    //Will respawn in 2 frames
    if alarm[5] == 2 {
        with(Player) {
            if alarm[5] > 1 && alarm[5] < global.wave_time*30 && team == other.team alarm[5] = 1;
        }
    }
");
Logged
Unfortunately, turning a section into a communist oppressive regime is not against the forum rules, so there is really nothing we can do.
Quote from: steam
21:08 - Hullusorsa: lorgan, when will you buy us the keys?
21:09 - Lorgan: i'm waiting for greece to collapse so the value of the euro drops
21:09 - Lorgan: not even joking

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12700
  • Another one --
Re: Respawn waves [Serverplugin]
« Reply #1 on: July 03, 2012, 02:06:48 pm »

where did the sticky go @@
put it back
where does the sticky keep going @@
no seriously stop unstickying this @@
« Last Edit: July 03, 2012, 06:15:31 pm by Chartreuse »
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

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12700
  • Another one --
Re: Respawn waves [Serverplugin]
« Reply #2 on: July 03, 2012, 06:58:35 pm »

I'm going to call the cops
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

Saniblues

  • Onion Knight
  • Administrator
  • *****
  • Karma: -1305
  • Offline Offline
  • Posts: 12409
Re: Respawn waves [Serverplugin]
« Reply #3 on: July 04, 2012, 05:34:31 pm »

suck it nerd
Logged
Quote from: mop
Quote from: MR MAGN3TIC
I don't like it.  :nah:
Oh, well, you might as well pack up and stop now, because he doesn't like it
I'm bored out of my skull, Lets play a different game!
Lets take a visit down below And cast the world in flames!

Meower

  • Elder God tier or Fagthulu, the great
  • Community Manager
  • *****
  • Karma: 230
  • Offline Offline
  • Posts: 23873
  • Went fat once, never went back
Re: Respawn waves [Serverplugin]
« Reply #4 on: July 04, 2012, 05:36:42 pm »

what the fuck are you all doing

why is everyone drunk
Logged

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12700
  • Another one --
Re: Respawn waves [Serverplugin]
« Reply #5 on: July 05, 2012, 10:25:36 am »

lmao where the hell did it go, I assumed you deleted it
now lorgan reposted it in vain qq
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

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12700
  • Another one --
Re: Respawn waves [Serverplugin]
« Reply #6 on: July 05, 2012, 11:20:05 am »

well shit
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

Lorgan

  • Retired Randomizer Mod Developer
  • Resident Miku
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 3657
    • My own website
Re: Respawn waves [Serverplugin]
« Reply #7 on: July 05, 2012, 12:12:06 pm »

stop fucking with my shit goddammit
Logged
Unfortunately, turning a section into a communist oppressive regime is not against the forum rules, so there is really nothing we can do.
Quote from: steam
21:08 - Hullusorsa: lorgan, when will you buy us the keys?
21:09 - Lorgan: i'm waiting for greece to collapse so the value of the euro drops
21:09 - Lorgan: not even joking

AlexTheFirst

  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 315
  • We are coming for you (bots + me)
Re: Respawn waves [Serverplugin]
« Reply #8 on: July 09, 2012, 08:39:05 am »

-___-
Logged
My grammar is bad, bcz i can't speak english very well

Footpöp

  • Veteran Member
  • ******
  • Karma: 24
  • Offline Offline
  • Posts: 4089
  • I /saw/ him
Re: Respawn waves [Serverplugin]
« Reply #9 on: October 08, 2012, 10:20:29 pm »

I'm not a fan of this in pub gg2 at all
soviet giraffe uses it and I ended up waiting what feels like a long ass time just to spawn with a useless spy
it doesn't really add any significant team elements to pubs because they are all pants on head and takes away the sense of individualism that makes pub gg2 fun
Logged
Team /ABC/

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12700
  • Another one --
Re: Respawn waves [Serverplugin]
« Reply #10 on: October 08, 2012, 10:50:24 pm »

they probably used a retarded timer
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.047 seconds with 51 queries.