Health System Trouble


(ZVWolf) #1

Hi Again.

I have done a pretty good search on this forum and others but have found nothing to suite my needs so here is my problem.

I am makeing a two player game and I am having trouble doing the health system.
In the game there are two objects which are controlled by two different players (they play on the same keyboard). For arguments sake the two objects are called OBJ01 and OBJ02. OBJ01 is parented to Spike01 and OBJ02 is parented to Spike02.

Spike01 has a property: Int | Spike01 | 1
Spike02 has a property: Int | Spike02 | 2

OBJ01 has a property: Int | health | 100 (Print Debug Info selected)
OBJ02 has a property: Int | health2 | 100 (Print Debug Info selected)

OBJ01
Sensor: Collision Spike02
Controller: And
Actuator: Property Add prop: health value: -1

OBJ02
Sensor: Collision Spike01
Controller: And
Actuator: Property Add prop: health2 value: -1

The basic idea is if Spike01(Attached to OBJ01) hits OBJ02 it -1 from the property health2 (which is set to a value of 100 at the start of the game). And if Spike 02(Attached to OBJ02) hits OBJ01 it -1 from the property health (which is set to a value of 100 at the start of the game).

So this is how I have set it up and it wont work. What have I done wrong? Or what is it that needs to be changed.
Also if this is the wrong way to go about this please tell me the correct way or refer me to a tutorial or demo.

Thanks A Lot
ZVWolf


(OTO) #2

Hello

Quite vague question
Your setup can work, but…depends much on other parameters
Can you post the file?
Anyway start to check and double check, names spelling, conections
and other little details
Bye


(ZVWolf) #3

Never mind people, I have worked it out :smiley:

Thanks

ZVWolf