Game Development Community

I've gone broken running out of ammo

by Terence Tan · in Torque Game Engine · 11/05/2006 (9:40 pm) · 1 replies

Hi,

Yep. I have gone and done it. I have some how broken the Ammo system in our current game (which was based on the starter.fps) but heavily modded. For some reason the ammo system doesn't work anymore and for the life of me I have NO idea where to fix it. The shapeImage transition system seems to work automatically and I can't seem to find out what is broken.

Right now I am:
1) Decrementing the amount of ammo correctly (Hell I kludge it by 'getting' the ammo remaining and calling setImageAmmo to false.
2) Have checked all paths to onFire. Checked that it is decrementing the ammo and getting to the proper place

What I don't know is how and where amount of ammo is checked and the state transitions to NoAmmo in the ShapeBaseImage? Right now I'm stumped and moving on to more important code fixes..but I need to know (it's killing me)...

#1
11/08/2006 (4:08 am)
Duh,

I am so silly...It was a namespace collision...Duh...Looking stupid in public!

I had a GUI object named Ammo that killed the datablock class Ammo. The class onInventory in Ammo BTW does the ammo state change (if anybody wants to know). I sort like my way better because it does not interate through 8 slots to findout that the ammo is empty..