Page 1 of 1

Playerstarts

Posted: Wed Jan 27, 2010 7:32 pm
by Leo T_C_K
I noticed that in UT, especially monsterhunt, playerstarts can be activated and deactivated.
But in Coop it always spawns you at playertstart whether it is active or not. Can this be changed?

Re: Playerstarts

Posted: Wed Jan 27, 2010 7:34 pm
by []KAOS[]Casey
     foreach AllActors( class 'PlayerStart', Dest )
     {
           if ( (Dest.bSinglePlayerStart || Dest.bCoopStart) && !Dest.Region.Zone.bWaterZone )
           {
                 if (num                        Candidate[num] = Dest;
                 else if (Rand(num) < 4)
                       Candidate[Rand(4)] = Dest;
                 num++;
           }

Re: Playerstarts

Posted: Wed Jan 27, 2010 8:19 pm
by Leo T_C_K
In UT it is      

Code: Select all

//choose candidates      
      for ( N=Level.NavigationPointList; N!=None; N=N.NextNavigationPoint )
      {
            Dest = PlayerStart(N);
            if ( (Dest != None) && Dest.bEnabled && !Dest.Region.Zone.bWaterZone )
            {
                  if (num

Re: Playerstarts

Posted: Wed Jan 27, 2010 8:21 pm
by Leo T_C_K
So I wonder why normal Unreal playerstarts have benabled too if it is only UT thing.

Re: Playerstarts

Posted: Wed Jan 27, 2010 9:30 pm
by Pravin
That's weird. I've used that flag before without problems...

Here's what I did:
1.) Create a group of playerstarts. This is group A.
2.) Create another group of playerstarts. This is group B.
3.) For each playerstart in group B, set bEnabled to false.
4.) Tag all of group A's playerstarts as "A", and all of B's playerstarts as "B".
5.) Issue a trigger event on A to turn off all A playerstarts, and another trigger event to turn on all B playerstarts.

When you respawn, you will start at a B playerstart instead of an A playerstart. Worked for me.

Re: Playerstarts

Posted: Thu Jan 28, 2010 12:07 am
by Leo T_C_K
That's what I did, but in UT it works and in original non tournament gametypes it doesn't (unless used with custom gametype like jcoop, xcoop etc, didn't try that). I didn't know it wouldn't work, so I had to delete the other playerstarts and update the map.

Re: Playerstarts

Posted: Thu Jan 28, 2010 12:19 am
by []KAOS[]Casey
Code I posted is from Unrealshare.coopgame

The code is probably different in DM/TDM etc.

Re: Playerstarts

Posted: Thu Jan 28, 2010 2:30 pm
by Leo T_C_K
Code I posted is from Unrealshare.coopgame

The code is probably different in DM/TDM etc.
In DM it is even worse, look:
     if ( N.IsA('PlayerStart') && !N.Region.Zone.bWaterZone )