Invincibility/Knockback (HELP!!!)

ranthonydevranthonydev Member Posts: 19
edited November -1 in Working with GS (Mac)
I posted this morning and got some great help when I implemented the suggestion by JohnPapiomitis after I got back home from work. Now I am running into a seperate issues. Here is what I would like to do:

Player gets hit by enemy, gets knocked up in the air and backwards *slightly*. Player takes 1 damage to health. While up in the air, 2 frame "Hit animation" displays, returning to normal afterwards. Player becomes invincible for 2 seconds. During this two seconds the player is blinking. After 2 seconds blinking stops, returning player to normal frames.

Here is my code so far:
Rule:
Actor Overlaps or collides with enemies+
game.invincibility = false

change attribute game.playerhealth = game.playerhealth-1
animate 2 frame 10 FPS loop checked, restore actor when done NOT checked (this is problem one, if I check restore actor the animation DOESN"T PLAY, if I don't check it obviously stays at the last frame until I move again, WHY?)

TIMER
For 4 seconds change game.invinvibility = true (run to completion not checked)
Timer
After 2 seconds change game.invincibility= false (run to completion checked)
(This part seems to be working right now, I include it becuase maybe its to blame for the other parts not working?)

I have yet to include the blinking becuase I still need the knockback part. I have tried move and move to commands with no success. any ideas how I could use them. Any other creative ideas? HELP PLEASE!

Comments

Sign In or Register to comment.