Page 1 of 1

Change Player's Spawn after specific wave in Invasion

Posted: Sat Aug 04, 2012 12:31 am
by TheRPGLPer
It's a simple question with more and likely a simple answer that I'm not getting, but in the Invasion gamemode, how do I change the players spawn point for after they die after a specific wave.

Here is the code if you need to see it:

Code: Select all

#include "zcommon.acs"
#include "customfunction.acs"

script 1 ENTER //opening script
{
printmapname("Marine HQ", "TheRPGLPer, JaundiceJaun", CR_BLUE, CR_WHITE, 5.0);
While((GetInvasionWave() != 3) || (GetInvasionState() != IS_COUNTDOWN))
delay(15);
setfont("ConFont");
printbold(s:"The door to the ammo room in the back of MarineHQ is now open.\nElevators are also lowered in the front to the upper levels.");
floor_lowertolowest(11, 50);
floor_lowerbyvalue(10, 35, 120);
}

script 2 (void) //elevator
{
floor_raisebyvalue(10, 35, 120);
delay(35*5);
floor_lowerbyvalue(10, 35, 120);
}

RE: Change Player's Spawn after specific wave in Invasion

Posted: Sat Aug 04, 2012 11:40 am
by Zupoman
Open Doom Builder 2/map editor. Give the player spawn a tid.

Now put this in code:
http://zdoom.org/wiki/SetActorPosition
And set tid parameter to player spawn tid.

RE: Change Player's Spawn after specific wave in Invasion

Posted: Sun Aug 05, 2012 1:22 am
by TheRPGLPer
Oh... well that was a lot easier than I thought.
Thank you for your help.

EDIT: Actually, that didn't work for some reason. I used it to get the X,Y,Z values of 4 differently tagged map spots to set the Player's 1, 2, 3, and 4 spawns to those map spots...
setactorposition(2, GetActorX(1), GetActorY(1), GetActorZ(1), true);
setactorposition(3, GetActorX(8), GetActorY(8), GetActorZ(8), true);
setactorposition(4, GetActorX(9), GetActorY(9), GetActorZ(9), true);
setactorposition(5, GetActorX(12), GetActorY(12), GetActorZ(12), true);

What did I do wrong because I still spawn in the exact same place after that wave as before, and now in the new spot.

RE: Change Player's Spawn after specific wave in Invasion

Posted: Sun Aug 05, 2012 8:53 am
by XutaWoo
He's actually not right about that.

Player starts aren't real actors, at least during runtime; thus, they cannot be manipulated by anything at all.

You can, however, use RESPAWN scripts to teleport players to the new location as soon as they spawn.

RE: Change Player's Spawn after specific wave in Invasion

Posted: Mon Aug 06, 2012 4:50 pm
by TheRPGLPer
How do I use the RESPAWN script, I've never used a script like that.

Nevermind, I know how to do it now.