Game Development Community

calling applyDamage from a gui class

by Jared Hoberock · in Torque Game Engine · 02/24/2002 (12:18 pm) · 0 replies

I've got an incrementing meter as a gui object and once its gets to 100 I want it to affect the health of the player. I'm using the HealthBarHud class in Rel1.1.1 plus my own class. The meter status variable I created is in ShapeBase just like mDamage. When I try to call applyDamage one of two things happens: the call has no effect on the player health or the game crashes with an access violation somewhere in ShapeBase::setDamageLevel function, which is called by applyDamage. Any ideas? Am I clear on the problem?