Game Development Community

Adding Weapons to be Picked Up

by Shawn Busolits · in Torque Developer Network · 03/05/2009 (5:21 pm) · 4 replies

I have a brand new project (via the wizard) and I want to add a crossbow to the world to be picked up and used by the players. I know how to physically add the object, and I've added an onCollision function to the crossbow.cs, but I can't figure out how to get from the crossbow's onCollision to the weapon's onPickup

#1
03/05/2009 (6:24 pm)
You shouldn't need an onCollision for the crossbow. Items are added/picked up automatically through the scripted inventory methods -- so long as it is added to the allowable inventory list in the player datablock. The health patch is the only exception in the stock scripts. Are you adding it in the Editor through the Shapes or the StaticShapes tree? Keep in mind that you can't interact with a StaticShape.
#2
03/05/2009 (6:59 pm)
Shawn Busolits you should wait till you get the engine it comes with the code for that and a test mission with items already in it to pick up.
#3
03/06/2009 (6:46 am)
Check out these tutorials.
#4
03/07/2009 (10:10 am)
hey... thanks for the replies, i'll have to check out that tutorial. I know it says I'm not an owner, but I'm working with a bigger group at school and we have a license, it just wasn't bought under my name.