How do I stop an continuous animation

Get help using Construct 2

Post » Mon Jul 11, 2016 8:45 pm

i have an event where if the sprite is -/+ x away from player it will move in that direction but i want the enemy to shoot an object every 2 seconds and play an animation but every time he does the continuous animation stops the other animation from doing so.If you need capx just tell me
B
10
S
4
Posts: 10
Reputation: 720

Post » Mon Jul 11, 2016 10:00 pm

Correct me if I'm wrong but I'm guessing your events looks something like,

If enemy is moving -> play walk (continuous) animation
If enemy shooting -> play shooting animation

So if this is in the right ballpark, you could get around it by inserting an extra condition in the first line, something like so:

If enemy is moving + shooting animation not playing -> play walk animation

This way your continuous animation won't interrupt the shooting animation.
B
50
S
23
G
17
Posts: 291
Reputation: 12,432

Post » Mon Jul 11, 2016 11:03 pm

almost there but if he tries to play animation he can't because the event says this always.I Have once animation has ended then it shots
B
10
S
4
Posts: 10
Reputation: 720

Post » Tue Jul 12, 2016 2:53 am

Not sure I understand correctly? He tries to play the shooting animation but is interrupted before it finishes? I can have a look at the capx if you'd like.
B
50
S
23
G
17
Posts: 291
Reputation: 12,432

Post » Tue Jul 12, 2016 3:44 am

B
10
S
4
Posts: 10
Reputation: 720

Post » Tue Jul 12, 2016 4:37 am

Is it the player character that's having the problem? You can do the same thing for him here:

Image
B
50
S
23
G
17
Posts: 291
Reputation: 12,432

Post » Tue Jul 12, 2016 4:57 am

can i do the same for the enemy tri demon elite
B
10
S
4
Posts: 10
Reputation: 720

Post » Tue Jul 12, 2016 5:59 am

Yep just add a similar condition for where the Tri Demon is moving towards the player
B
50
S
23
G
17
Posts: 291
Reputation: 12,432

Post » Tue Jul 12, 2016 6:09 am

well i did that and he stands there and does his anamtiaon
B
10
S
4
Posts: 10
Reputation: 720

Post » Tue Jul 12, 2016 6:30 pm

You most likely need to make it a sub-event so it doesn't interfere with the Demon's movement AI sorta like this:

Image
B
50
S
23
G
17
Posts: 291
Reputation: 12,432

Next

Return to How do I....?

Who is online

Users browsing this forum: DharmaOne, Yahoo [Bot] and 6 guests