make this player respond to death

Get help using Construct 2

Post » Tue Dec 02, 2014 11:44 pm

Hey Guys/Gals

I have attached a capx file for viewing.... something I'm battling right now in a game I'm creating is that when the player comes in contact with the enemy I have a nice little animation of him dying.... problem is and illustrated in this is capx is that if I keep pressing something after touching the enemy he simply goes into another animation and the game keeps going.. how can I have the dying animation play out then be done with the level restart the layout... I tried turning collision off after making contact but that in return drops the boss of the platform? if that makes sense thats what happen.... I tried setting up VAR's to track if he has been touched by the boss and if he has to enter him into a dying mode and if not he is in alive mode but that got messy... any ideas?
You do not have the required permissions to view the files attached to this post.
Need Sprites For Your Next Project?
100% Vector Animated Sprites
B
8
S
2
Posts: 170
Reputation: 1,086

Post » Wed Dec 03, 2014 12:01 am

Change the condition "On collision" for "Is overlapping" and on this same event, add the platform action "Set Enabled " and set it to Disabled.
That will make the player unable to move while is touching the enemy.
B
75
S
29
G
17
Posts: 256
Reputation: 15,250

Post » Wed Dec 03, 2014 1:58 pm

Ok so this did work to a certain point however it plays the death animation but still if I press left or right he jumps back up ( dont move) but gets into another animation position
Need Sprites For Your Next Project?
100% Vector Animated Sprites
B
8
S
2
Posts: 170
Reputation: 1,086

Post » Wed Dec 03, 2014 2:04 pm

ok well strange enough I was doing this on my actual project and the result was the above - however doing this on the sample I provided has the player not taking any input after he hits enemy... so what do I have in my project that is making him bounce back to life....
You do not have the required permissions to view the files attached to this post.
Need Sprites For Your Next Project?
100% Vector Animated Sprites
B
8
S
2
Posts: 170
Reputation: 1,086

Post » Wed Dec 03, 2014 2:35 pm

Try moving the event "player is overlapping with enemy" to the bottom of the event sheet. It needs to be below the events that control "key is down".
B
75
S
29
G
17
Posts: 256
Reputation: 15,250

Post » Wed Dec 03, 2014 2:37 pm

player is overlapping enemy is the last entry in the events... number#26 already?
Need Sprites For Your Next Project?
100% Vector Animated Sprites
B
8
S
2
Posts: 170
Reputation: 1,086

Post » Wed Dec 03, 2014 3:06 pm

Can you share the .capx?
B
75
S
29
G
17
Posts: 256
Reputation: 15,250

Post » Wed Dec 03, 2014 3:10 pm

ok so here how I finally got around this - all keyboard input is now tied to a boolean alive... when he makes contact with enemy boolean set to false and all input to animations is killed....
Need Sprites For Your Next Project?
100% Vector Animated Sprites
B
8
S
2
Posts: 170
Reputation: 1,086


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests