Starting with weapons
by Tom Bampton · in Torque Game Engine · 05/30/2003 (6:54 pm) · 2 replies
Basically, I want the player to be able to start with weapons. It seems the simplest way to do this is to create the weapon and call pickup() in GameConnection::createPlayer(). The trouble is, I'm not too sure how to create the weapon object. Is there anything special required or will %weapon = new Crossbow; do it?
Also, if there's a better way to start with weapons, I'd like to hear it.
Thanks,
Tom.
Also, if there's a better way to start with weapons, I'd like to hear it.
Thanks,
Tom.
#2
For anyone else reading that wants to know, you need a %player.use("Crossbow"); after that else you'll have the weapon but it wont be selected.
05/31/2003 (5:42 am)
Aha! Now I feel really stupid :-) Thanks.For anyone else reading that wants to know, you need a %player.use("Crossbow"); after that else you'll have the weapon but it wont be selected.
Torque 3D Owner Xavier "eXoDuS" Amado
Default Studio Name
Here goes again.
Just do something like the following in game.cs, in the function where the player is created
%player.setInventory("Crossbow", 1);