HELP with teams and classes
by DylaNemesis · in Torque 3D Beginner · 10/06/2013 (7:47 pm) · 2 replies
I used the following resource http://www.garagegames.com/community/resources/view/19447/2#comment-194428 and updated the models and such to the most recent ones i have (used the solder by default) and no matter what team or class the player picks they are stuck as an observer camera. please help i've had no luck in sorting this out and have been trying for quite a while now
#2
Teams are easy, it's just an assigned number on the client and/or the player object, from there just modify the other important code of the game to check that number (IE: Damage, object collision, ect)
Classes are kind of like load outs in a way. Create a GUI that has your class list and wire it to the server based on the client id. From there simply assign a field saying what "class" the player is using and apply the settings based on that.
10/09/2013 (5:42 pm)
Personally I'd write my own code for both of those.Teams are easy, it's just an assigned number on the client and/or the player object, from there just modify the other important code of the game to check that number (IE: Damage, object collision, ect)
Classes are kind of like load outs in a way. Create a GUI that has your class list and wire it to the server based on the client id. From there simply assign a field saying what "class" the player is using and apply the settings based on that.
Torque 3D Owner Patrick Webber
I've only briefly looked through that resource, so I may be totally off on this...but I think that "%this.playerClass.playerClassId" isn't being set.
I would say to add a case 0 to the switch and see if it works then. If it does, you know that "%this.playerClass.playerClassId" isn't being setup properly.
Something like this...
switch ( %this.playerClass.playerClassId ) { // In case something went wrong case 0: %classDatablock = Player1Class1; // Class 1 case 1: %classDatablock = Player1Class1; // change to another datablock when we make new models for each class // Class 2 case 2: %classDatablock = Player1Class2; // Class 3 case 3: %classDatablock = Player1Class3; // Class 4 case 4: %classDatablock = Player1Class4; // Class 5 case 5: %classDatablock = Player1Class5; }Put a case 0 like that in for team 1 and team 2, and see what that does.I hope this helps.