Game Development Community

How to pick up a rifle

by Ironbelly Studios · in Torque Game Engine · 09/18/2006 (2:59 am) · 5 replies

I am a new user to torque,
i do n't know if i am correct.
i created an enrolment using torque tutorial base and willing to put a rifle for player to pick it up and use it
the problem is ...the player is there,the rifle is there,but the player is not picking up the gun.it just passes through when goes near the gun.
anybody knows about it and can help me and guide me regarding this is most welcome.
Thanking in advance to every body.

#1
09/18/2006 (5:34 am)
You have to have it in inventory,
And make sure your rifle has a bounds box
#2
09/19/2006 (6:05 am)
Thanks Surge and all
for the help
i hv it inventory
but i m sure about bounds box
so please if you can then tell me in a bit more deatailed.
thanking
#3
10/04/2006 (6:39 am)
Thanks Surge and all
for the help
i hv it inventory
but i m not sure about bounds box
so please if you can then tell me in a bit more deatailed.
thanking
#4
10/04/2006 (6:45 am)
You should look at the docs for exporting a simple shape, then go up to exporting a weapon.
ITs my understanding that its the collision of the bounds box around your weapon which
would trigger the mounting.
#5
10/04/2006 (7:45 am)
What software did you make your weapon in? If you like you can email me your weapon resource and I will take look at to see if setup correctly.

Do you have this in game.cs in server/scripts?

// Starting equipment
   %player.setInventory(MyGun,1);
   %player.setInventory(MyGunAmmo,12);
   %player.mountImage(MyGunImage,0);

Do you have this in player.cs in server/scripts?

// Allowable Inventory Items
   maxInv[CrossbowAmmo] = 50;
   maxInv[Crossbow] = 1;
   maxInv[myGunAmmo] = 120; // add this line
   maxInv[myGun] = 1; // add this line