Game Development Community

Can't Pick Up Weapon

by Lisa Holden · in Artist Corner · 07/11/2008 (8:32 pm) · 9 replies

I just implemented three weapons into my Torque game. When I go into the world creator to add the weapons to the environment, the weapons appear. The problem is, when I try to pick up the weapon, I can't. I can bump into the weapon so there is collision detection but I can't pick it up. Does anyone know what the problem may be?

About the author

Recent Threads

  • Background Music

  • #1
    07/11/2008 (9:40 pm)
    Check if the player has the weapon in the inventory before you try to pickup, cause if the player has it then he can't pickup it again.
    #2
    07/11/2008 (10:05 pm)
    I checked and the weapons are not in the inventory. Is there anything else I could be missing?
    #3
    07/12/2008 (10:12 pm)
    Have you added these things about your new weapons to your player datablock in the player.cs

    maxInv[yourweaponname] = 1;
    maxInv[yourweaponammoname] = 500;

    you can see these things for the torque crossbow there, at the end of the datablock.
    #4
    07/12/2008 (10:49 pm)
    Yes I added that at the end of datablock and it is still not working. I have tried everything. The weapon just spins on the ground and I can run through the item now (so now there isn't any colision detection) but it still won't equip to the character.
    #5
    07/13/2008 (1:22 am)
    Did you add mount nodes on the weapons?

    and double check the names for maxInv..
    #6
    07/13/2008 (9:06 am)
    Did you put the name of your weapon in the maxInv[yourweaponname]

    double check this...
    #7
    07/14/2008 (1:48 pm)
    Yes I added mount nodes to the weapons and the name for maxInv is correct. Still no change.
    #8
    07/14/2008 (2:47 pm)
    When you added it with the GUI editor did you add the weapon under StaicShapes or Shapes.

    It should have been added as a Shape.
    #9
    07/18/2008 (6:38 pm)
    Thanks guys for all the help. I finally got it to work.