Game Development Community

TGEA 1.7.1 T3D Weapon Select Script

by Eric Clausing · in Torque Game Engine Advanced · 06/21/2008 (10:32 pm) · 4 replies

I am trying to add more weapons to the weapon select menu and I am just not seeing it. I was able to add more player models to the demo but cannot find the script section on the client side to add the weapons.

Thanks

#1
01/28/2009 (1:59 pm)
you can find the weapons in:

game\common\unifiedShell\ObjectPickerGui.cs

$PICKER::WEAPON["Default"] = $defaultGame @ "/data/shapes/weapons/SwarmGun/swarmgun.dts";
$PICKER::WEAPON["Rocket Launcher"] = $defaultGame @ "/data/shapes/weapons/SwarmGun/swarmgun.dts";
$PICKER::WEAPON["Crossbow"] = $defaultGame @ "/data/shapes/weapons/crossbow/weapon.dts";
#2
10/31/2009 (1:40 am)
i tried that but it didn't work for me... In the server/scripts/game.cs it says to add it in the client/init.cs file under loadWeaponPickerData();
The only problem is that function doesn't exist. i tried creating it following the player function thats there but that didn't work either. Any other ideas?
#3
11/04/2009 (6:44 am)
Found how to add them after a few days off. There is a row in the game\common\unifiedShell\ObjectPickerGui.cs file that says this.. You just add them on like so.

//Default List
%this.setOptions($PICKER::ROW_MOUNT, "Default\tRocket Launcher\tCrossbow");

//Added Sword
%this.setOptions($PICKER::ROW_MOUNT, "Default\tRocket Launcher\tCrossbow\tSword");
#4
05/26/2012 (6:40 pm)
Would you tell me how to use ObjectPickerGui to select player?I have tried some ways,but none of them works.Help me,please~