I am having difficulties switching an objects instance variable from 1 to 2 and back again (I think I should be using the boolean thing but I would have thought this would have worked too)
I basically want an enemy to switch to another mode when his health reaches 120 (from 180)
My idea was while mode/variable=1; bullet subtracts 4 from health/variable on collision
when health reaches 120, mode variable switches to 2 (bullet doesnt subtract from health variable when in this mode)
This works, but then I had it wait for 4 seconds before it set value back to mode/variable 1 but it won't switch back untill the enemy is hit with bullet?
Very confused about this? tried many variations with very random results
Develop games in your browser. Powerful, performant & highly capable.
Try to add a condition "Trigger once while true" to the "health=120" condition.
Wow, awesome that works, thanks heaps