August 17, 2018, 10:23:35 PM

Author Topic: Starting game with trigger [SOLVED]  (Read 11037 times)

WinCat

  • Founder
  • ***
  • Posts: 1094
  • Karma: 86
    • View Profile
    • My Site
Re: Starting game with trigger
« Reply #15 on: July 23, 2015, 10:15:24 PM »
yup  ;D

KeaPDreaMing

  • Recently Bitten
  • **
  • Posts: 36
  • Karma: 0
    • View Profile
Re: Starting game with trigger
« Reply #16 on: July 23, 2015, 10:35:20 PM »
now do i add that script under the one i already have in my _zombiemode.gsc
 this one ?

Code: [Select]
round_start()
{
 activate_trig = getent("start_rounds", "targetname");
 activate_trig waittill("trigger");
 
 
}


WinCat

  • Founder
  • ***
  • Posts: 1094
  • Karma: 86
    • View Profile
    • My Site
Re: Starting game with trigger
« Reply #17 on: July 23, 2015, 10:52:37 PM »
We have just 'added' to yours look and you will spot your code in the code, just replace those two lines with the lines provided above.

KeaPDreaMing

  • Recently Bitten
  • **
  • Posts: 36
  • Karma: 0
    • View Profile
Re: Starting game with trigger
« Reply #18 on: July 23, 2015, 10:57:29 PM »
so my code will look like ?

 
Code: [Select]
round_start()
{
 activate_trig = getent("start_rounds", "targetname");
 activate_trig waittill("trigger");
  iprintln("waiting to start round");
    activate_trig = getent("start_rounds", "targetname");
    activate_trig setCursorHint("HINT_NOICON");
    activate_trig sethintstring("Press &&1 to start rounds");
    activate_trig waittill("trigger");
    iprintln("starting rounds...);

}

Edit: When i used that code I got a script compile error bad token ' " '

http://images.akamai.steamusercontent.com/ugc/702910668802514085/4626BBC48B51CFD4057C557901672EDB5C3493D4/
« Last Edit: July 24, 2015, 01:46:04 AM by KeaPDreaMing »

WinCat

  • Founder
  • ***
  • Posts: 1094
  • Karma: 86
    • View Profile
    • My Site
Re: Starting game with trigger
« Reply #19 on: July 24, 2015, 07:33:39 AM »
No you have added the lines not replaced...  :-X


The fact you got a error tho is good! since it confirms your changes are been loaded.
The error is the last line it's missing a " before );

Code: [Select]
iprintln("starting rounds...);to:
Code: [Select]
iprintln("starting rounds...");

KeaPDreaMing

  • Recently Bitten
  • **
  • Posts: 36
  • Karma: 0
    • View Profile
Re: Starting game with trigger
« Reply #20 on: July 24, 2015, 04:25:44 PM »
so instead of using

Code: [Select]
round_start()
{
 activate_trig = getent("start_rounds", "targetname");
 activate_trig waittill("trigger");
  iprintln("waiting to start round");
    activate_trig = getent("start_rounds", "targetname");
    activate_trig setCursorHint("HINT_NOICON");
    activate_trig sethintstring("Press &&1 to start rounds");
    activate_trig waittill("trigger");
   iprintln("starting rounds...");

}


I SHOULD USE THIS :

Code: [Select]
round_start()
{   
iprintln("waiting to start round");
    activate_trig = getent("start_rounds", "targetname");
    activate_trig setCursorHint("HINT_NOICON");
    activate_trig sethintstring("Press &&1 to start rounds");
    activate_trig waittill("trigger");
    iprintln("starting rounds...");


}

Edit: The second code has worked in the sense of no compile errors, but it's not starting the rounds. when the game starts  in the top left it says " waiting to start rounds" then when the trigger is activated it says "starting rounds" but nothing, no zombies start spawning.

Spoiler :
Spoiler :
« Last Edit: July 24, 2015, 04:42:29 PM by KeaPDreaMing »

WinCat

  • Founder
  • ***
  • Posts: 1094
  • Karma: 86
    • View Profile
    • My Site
Re: Starting game with trigger
« Reply #21 on: July 24, 2015, 06:51:58 PM »
I assume zombies where spawning fine before?

If so I'll check over the code and see if and other changes need to be made.

M.A.K.E C E N T S

  • Infected
  • ***
  • Posts: 84
  • Karma: 5
  • Take a deep breath. . . . . . . . Now get it done.
    • View Profile
    • M.A.K.E C E N T S GAMING
Re: Starting game with trigger
« Reply #22 on: July 24, 2015, 07:09:25 PM »
so instead of using

Code: [Select]
round_start()
{
 activate_trig = getent("start_rounds", "targetname");
 activate_trig waittill("trigger");
  iprintln("waiting to start round");
    activate_trig = getent("start_rounds", "targetname");
    activate_trig setCursorHint("HINT_NOICON");
    activate_trig sethintstring("Press &&1 to start rounds");
    activate_trig waittill("trigger");
   iprintln("starting rounds...");

}


I SHOULD USE THIS :

Code: [Select]
round_start()
{   
iprintln("waiting to start round");
    activate_trig = getent("start_rounds", "targetname");
    activate_trig setCursorHint("HINT_NOICON");
    activate_trig sethintstring("Press &&1 to start rounds");
    activate_trig waittill("trigger");
    iprintln("starting rounds...");


}

Edit: The second code has worked in the sense of no compile errors, but it's not starting the rounds. when the game starts  in the top left it says " waiting to start rounds" then when the trigger is activated it says "starting rounds" but nothing, no zombies start spawning.

Spoiler :
Spoiler :


You didn't replace your whole round_start did you? Should be something like this when you are done:

Code: [Select]

round_start()
{
activate_trig = getent("start_rounds", "targetname");
 activate_trig waittill("trigger");
  iprintln("waiting to start round");
    activate_trig = getent("start_rounds", "targetname");
    activate_trig setCursorHint("HINT_NOICON");
    activate_trig sethintstring("Press &&1 to start rounds");
    activate_trig waittill("trigger");
   iprintln("starting rounds...");
level.zombie_health = level.zombie_vars["zombie_health_start"];
level.round_number = 20;
level.first_round = true;

// so players get init'ed with grenades
players = get_players();
for (i = 0; i < players.size; i++)
{
players[i] giveweapon( "stielhandgranate" );
players[i] setweaponammoclip( "stielhandgranate", 0);
}

level.chalk_hud1 = create_chalk_hud();
level.chalk_hud2 = create_chalk_hud( 64 );

// level waittill( "introscreen_done" );

level.round_spawn_func = ::round_spawning;

/#
if (GetDVarInt("zombie_rise_test"))
{
level.round_spawn_func = ::round_spawning_test; // FOR TESTING, one zombie at a time, no round advancement
}
#/

level thread round_think();
}

WinCat

  • Founder
  • ***
  • Posts: 1094
  • Karma: 86
    • View Profile
    • My Site
Re: Starting game with trigger
« Reply #23 on: July 24, 2015, 07:45:47 PM »
lol if he did :P ;D

KeaPDreaMing

  • Recently Bitten
  • **
  • Posts: 36
  • Karma: 0
    • View Profile
Re: Starting game with trigger [Solved]
« Reply #24 on: July 24, 2015, 08:17:27 PM »
YOU BOTH ARE BEAUTIFUL AND I LOVE YOU BOTH THANKS SO MUCH FOR THE PATIENTS AND HELP!

WinCat

  • Founder
  • ***
  • Posts: 1094
  • Karma: 86
    • View Profile
    • My Site
Re: Starting game with trigger [SOLVED]
« Reply #25 on: July 24, 2015, 09:12:44 PM »
 8)