Death Animation

Just started using Construct 2? Post your questions here

Post » Tue Nov 25, 2014 12:41 am

I'm new to construct 2 (4th day) and I can't quite figure out how to get my death animation to work. It seems to get stuck playing a few frames and not the whole animation. I tried just replacing the object with a new one of the death but the player just disappears. What i'm looking to do is play the death animation, stay on the last frame for a few seconds and then fade out. Any help would be greatly appreciated!
You do not have the required permissions to view the files attached to this post.
B
4
Posts: 14
Reputation: 236

Post » Tue Nov 25, 2014 1:00 am

Add this to the event:
I must say amazing work for a beginner.
You do not have the required permissions to view the files attached to this post.
Image
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Tue Nov 25, 2014 1:06 am

A0Nasser wrote:Add this to the event:
I must say amazing work for a beginner.


Thank you! I actually have a background in game making but i'm not a programmer (well I help with minor code in C#) and this is something i'm doing without the team. :)
B
4
Posts: 14
Reputation: 236

Post » Tue Nov 25, 2014 1:13 am

A0Nasser wrote:Add this to the event:
I must say amazing work for a beginner.



It worked but the animation loops 3 or 4 times before stopping. I suppose I need a boolean to turn off the shooting as well?
B
4
Posts: 14
Reputation: 236

Post » Tue Nov 25, 2014 1:22 am

System..Trigger once while true
You do not have the required permissions to view the files attached to this post.
Image
B
64
S
23
G
7
Posts: 1,482
Reputation: 10,825

Post » Tue Nov 25, 2014 1:43 am

korbaach wrote:System..Trigger once while true


Totally worked! Thank you sooo much!
B
4
Posts: 14
Reputation: 236

Post » Tue Nov 25, 2014 3:46 am

One more question. It works as long as i'm not pushing any of the movement keys but if you are it just glitches and he just stands there. I thought that's what the inverted platform is moving would have fixed but I guess not?
B
4
Posts: 14
Reputation: 236

Post » Tue Nov 25, 2014 12:40 pm

You actually need to make some "state" to add as a condition in your "is falling" event.
You can add a boolean "Alive" to your player object that will be kept true as long as it is alive. You can do the same by checking that Health's value is > 0.

On the moment it dies, pass the boolean to False, it will make it so that only the death animation is played, entirely and not "short circuited" by the "falling"/"on landed" animation.

See attached capx made in r189.
You do not have the required permissions to view the files attached to this post.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
284
S
109
G
91
Posts: 7,319
Reputation: 87,487

Post » Tue Nov 25, 2014 9:08 pm

Thank you Kyatric you are the best! I've seen your tutorials and you have been very helpful in the forums!
B
4
Posts: 14
Reputation: 236

Post » Tue Nov 25, 2014 10:29 pm

Message: socialbot is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
Kyatric wrote:You actually need to make some "state" to add as a condition in your "is falling" event.
You can add a boolean "Alive" to your player object that will be kept true as long as it is alive. You can do the same by checking that Health's value is > 0.

On the moment it dies, pass the boolean to False, it will make it so that only the death animation is played, entirely and not "short circuited" by the "falling"/"on landed" animation.

See attached capx made in .



Okay I think i'm doing this right but it works as long as i'm standing still... if the death animation starts playing and you push a movement key he ends up just standing there and then never dies.
You do not have the required permissions to view the files attached to this post.
B
4
Posts: 14
Reputation: 236

Next

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests