Monty@Posted: Sat Dec 01, 2012 12:18 am :
Hello,

I'm wondering, is there a way to set up multiple info_player_start entities in a map, and somehow choose which one is used to spawn the player?

Note: I've noticed that pak000/maps/game/enpro.map has two instances of info_player_start. However, I'm not sure how, or even if both of them are used; there are no references to them in the script file.



Monty@Posted: Tue Feb 05, 2013 5:23 pm :
It looks like Doom simply browses the map file in a sequential order (like a text file) and uses the first info_player_start it finds as a starting point.

I had to change the source code to create a script function that allowed me to choose the next spawn entity. I created a new function in idGameLocal, called SetNextStartEntity(), which took the name of an entity as a parameter.

Note: I did this so I could "knock out" (kill) the player, change a few of the map's settings, and have him wake up in the same map, but I ended up creating a second map because it was more practical.



The Happy Friar@Posted: Tue Feb 05, 2013 6:55 pm :
id uses teleports to put the player where they want at certain times. IE map level load, when you run a cinematic, etc.



Monty@Posted: Fri Feb 15, 2013 1:03 am :
Oh you're right, I just tested it.

I hadn't tried using func_teleport entities before. Thank you, that's another entity I can add to my knowledge base!