[Already In] Basic interaction with player start points

Moderator: GZDoom Developers

Basic interaction with player start points

Postby Apeirogon » Sat Feb 13, 2021 1:48 pm

Recently I have been played in Sunder in multiplayer with my friends using Gzdoom. Spoiler alert, Sunder was not designed with multiplayer in mind, so it have only one player start on each map.
So at the beginning of each map I was telefraged, and then forced to wait a minute or two until all players are spawned and moved away from spawning point so I would be able to respawn. And its not very interesting.

What I ask for is expose some "player start related" methods to Zscript so it would be possible to spawn player at player start with offset/wait until it would be possible to spawn without being telefragged/create temporally new player start/etc. using custom, user created script.
User avatar
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: Basic interaction with player start points

Postby _mental_ » Sat Feb 13, 2021 2:00 pm

Did you try to add more player starts via LevelPostProcessor?
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Basic interaction with player start points

Postby Apeirogon » Sat Feb 13, 2021 2:08 pm

It possible now?
If it possible with AddThing(arguments), how use it properly? I just need to use thing id from map editor (so for player starts it 1-4)?
User avatar
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: Basic interaction with player start points

Postby _mental_ » Sun Feb 14, 2021 7:14 am

The following code adds player starts to a map with no things at all.
Code: Select allExpand view
class AddPlayerStartsLevelPostProcessor : LevelPostProcessor
{
   protected void Apply(Name checksum, String mapname)
   {
      for (int i = 1; i < 5; ++i)
      {
         AddThing(i, (64 * i, 0, 0));
      }
   }
}
_mental_
 
 
 
Joined: 07 Aug 2011


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 3 guests