1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Player classes

Discussion in 'Programming' started by barnEbiss, Feb 14, 2002.

  1. barnEbiss

    barnEbiss Member

    Joined:
    Jul 8, 2001
    Messages:
    781
    Likes Received:
    0
    I have a new player class I want use with my game type how do I make it use it are there any tutorials that go into this?
     
  2. Call me Erdrik

    Call me Erdrik Arch Mage

    Joined:
    Nov 24, 1999
    Messages:
    334
    Likes Received:
    0
    If I remember correctly there should be a defualtplayerclass property in the Default Properties of the GameType.

    Then make sure your using the GameType in the Levels LevelInfo....
     
  3. barnEbiss

    barnEbiss Member

    Joined:
    Jul 8, 2001
    Messages:
    781
    Likes Received:
    0
    So would it be something like this?


    class PutlGame expands TeamGamePlus;

    defaultproperties
    {
    Defualtplayer=class'putl.Commander'
    HUDType=Class'putl.putlhud'
    GameName="PutL TeamGame"
    }
     
  4. mr.s-d

    mr.s-d CHiMERiC Moderator

    Joined:
    Aug 30, 2001
    Messages:
    65
    Likes Received:
    0
    iirc a player only gets spawned as the DefaultPlayer class if they've chosen a PlayerPawn class that isn't allowed (e.g. bHumansOnly) or isn't on the server.
     
  5. Raeled

    Raeled Feuer Frei!

    Joined:
    Jul 1, 2001
    Messages:
    161
    Likes Received:
    0
    set the defaultplayerclass to your class like you said.
    Then add this to the code:

    Code:
    event playerpawn Login(  string Portal, string Options, out string Error, class<playerpawn> SpawnClass)
    {
      return Super.Login(Portal, Options, Error, DefaultPlayerClass);
    }
    
     

Share This Page