Change Player's Spawn after specific wave in Invasion

Discuss all aspects related to modding Zandronum here.
Post Reply
TheRPGLPer
 
Posts: 25
Joined: Sat Aug 04, 2012 12:30 am
Location: La Follette, TN
Contact:

Change Player's Spawn after specific wave in Invasion

#1

Post by TheRPGLPer » Sat Aug 04, 2012 12:31 am

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);
}

Zupoman
Forum Regular
Posts: 110
Joined: Tue Jun 26, 2012 6:30 pm

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

#2

Post by Zupoman » Sat Aug 04, 2012 11:40 am

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.
This signature is empty and useless, I would write another useless idiotism here but people will call me a noob for that, so sorry, no more signatures for you. Go somewhere else.

TheRPGLPer
 
Posts: 25
Joined: Sat Aug 04, 2012 12:30 am
Location: La Follette, TN
Contact:

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

#3

Post by TheRPGLPer » Sun Aug 05, 2012 1:22 am

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.
Last edited by TheRPGLPer on Sun Aug 05, 2012 1:44 am, edited 1 time in total.

XutaWoo
Forum Regular
Posts: 113
Joined: Mon Jun 04, 2012 7:04 am

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

#4

Post by XutaWoo » Sun Aug 05, 2012 8:53 am

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.
[spoiler]Image[/spoiler]
Image

TheRPGLPer
 
Posts: 25
Joined: Sat Aug 04, 2012 12:30 am
Location: La Follette, TN
Contact:

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

#5

Post by TheRPGLPer » Mon Aug 06, 2012 4:50 pm

How do I use the RESPAWN script, I've never used a script like that.

Nevermind, I know how to do it now.
Last edited by TheRPGLPer on Mon Aug 06, 2012 4:53 pm, edited 1 time in total.

Post Reply