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.

Any chance of a sample class based mod? :D

Discussion in 'Ask a Coder' started by Euphoric Beaver, Aug 25, 2001.

  1. Euphoric Beaver

    Euphoric Beaver impeccably groomed

    Joined:
    Apr 19, 2001
    Messages:
    3,158
    Likes Received:
    0
    Since I'm starting out I don't really know how to do anything like that.
    I've played Unf and like that setup. ie. You choose your class before you start.

    And I know in theory how to do it, but don't know how.

    Okay I'm guessing you make a subclass of each tournamentplayer for each class, with all the health, armour weapons set inside this.
    Then when you pick the class it simply changes the player before start.

    Perhaps this could be the basis for a tutorial?
     
  2. Smoke39

    Smoke39 whatever

    Joined:
    Jun 2, 2001
    Messages:
    1,793
    Likes Received:
    0
    There's a tut at Semantic Error. There's a thread here with a list of coding sites.
     
  3. 2COOL4-U

    2COOL4-U New Member

    Joined:
    Mar 17, 2001
    Messages:
    505
    Likes Received:
    0
    As DefenceAlliance doesn't need much more than a different inventory and a few exec function for each class, I placed all the exec functions in one class, and placed the class variables in the PlayerReplicationInfo
    Code:
    var enum EClass
    {
            CL_Mechanic,
            CL_Medic,
            CL_Infantry,
            CL_MGunner,
            CL_Grenadier,
            CL_Sniper
    } CClass, BClass;
    The CClass is used to store the class that a player wants to be upon respawn and the BClass contains the current class of the player. You should write a function in your playerclass that sets BClass to CClass, and changes a few properties of the player like
    GroundSpeed for example. Call that function in your custom variant of RestartPlayer.

    Hope this will help
     
  4. Vig

    Vig New Member

    Joined:
    Aug 21, 2001
    Messages:
    6
    Likes Received:
    0
  5. Euphoric Beaver

    Euphoric Beaver impeccably groomed

    Joined:
    Apr 19, 2001
    Messages:
    3,158
    Likes Received:
    0
    Cheers jbirby. :D

    I'll have alook now.
     

Share This Page