PDA

View Full Version : Any chance of a sample class based mod? :D


Euphoric Beaver
25th Aug 2001, 01:38 PM
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?

Smoke39
25th Aug 2001, 01:47 PM
There's a tut at Semantic Error. There's a thread here with a list of coding sites.

2COOL4-U
26th Aug 2001, 02:51 AM
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

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

Vig
27th Aug 2001, 08:20 AM
The link to that Semantic Error tutorial is

http://www.webtribe.net/s/seerlord/UScript/tutes/CCS.html

Euphoric Beaver
27th Aug 2001, 08:32 AM
Cheers jbirby. :D

I'll have alook now.