Where should I implement these features?
by Nikhil Haldar-Sinha · in Torque Game Engine · 06/06/2006 (6:18 pm) · 0 replies
I'm attempting to add these features to the FPS demo:
1) Only certain weapons have the zoom feature
So I need to add some kind of property to each weapon on whether or not the player can zoom with it. Should I do this in ItemData.h? Or can this be done in script?
2) Only 2 weapons can be in the inventory at a time
I'm not sure how the current inventory works. Player has a maxinv array. And then inventory.cs has a ShapeBase class. Is there a datablock for this? Or does it now just exist because the methods for this class are defined? I'm confused when this gets called. I believe all items extend ShapeBase. And where is setInventory defined?
Thanks.
-Nick
1) Only certain weapons have the zoom feature
So I need to add some kind of property to each weapon on whether or not the player can zoom with it. Should I do this in ItemData.h? Or can this be done in script?
2) Only 2 weapons can be in the inventory at a time
I'm not sure how the current inventory works. Player has a maxinv array. And then inventory.cs has a ShapeBase class. Is there a datablock for this? Or does it now just exist because the methods for this class are defined? I'm confused when this gets called. I believe all items extend ShapeBase. And where is setInventory defined?
Thanks.
-Nick