Basic Shooting game with unique Death
yomamababy
Member Posts: 8
Hello there, I was wondering if anyone knows how to gradually add a constraint on the main actor making him walk slower and slower until he is unable to move. Then have an option to kill yourself to restart the scene.
The effect I want is when the zombie enemies are colliding with the actor, he must shoot them off, but if there is too many over a certain period of time he will slow down and eventually be unable to shoot and move; then he will have an option appear on the screen that you can press to kill the actor, and start the level over.
Would anyone have an idea how to go about this technique?
The effect I want is when the zombie enemies are colliding with the actor, he must shoot them off, but if there is too many over a certain period of time he will slow down and eventually be unable to shoot and move; then he will have an option appear on the screen that you can press to kill the actor, and start the level over.
Would anyone have an idea how to go about this technique?
Comments
Like this:
When actor collides with zombie change an attribute called ['Speed!!!'] to ['Speed!!!' -10]
So if his initial speed is, for example, 200 - and if he keeps colliding with zombies this 'Speed!!!' attribute will go:
200
190
180
170
160
. . . . etc etc
So you can use this speed attribute to control his overall speed.
Use the keys to avoid the 'zombies' (cough . . cough . . 'squares)'.
http://www.mediafire.com/?ngba4xy3t65ru23
You start with a speed of 300, every time you collide that goes down by 10, it's quite funny you do start to feel exhausted/weaker when your speed drops.
I did not see an option for "speed" but I found density and added a density attribute on the actor itself and set it to real and at 200. I also put the Rule when actor collides with Zombie do Change attribute of self.physics.density to self.physics.density-10, and for some reason it didn't change the movement speed of the character any.
Q: how are you controlling your main actor - I mean: what are you using ? Move ? Move to ? Accelerate ? . . . etc etc