Enemy Graphics

Get help using Construct 2

Post » Tue Apr 10, 2012 4:08 pm

I add a sine behavior in my enemy.
How can I change the animation when he goes left and right.
I know how to make it on my player.. Use mirror.But how could I know when the enemy is going left or right so that I could change its Animation. =)
B
13
S
3
G
3
Posts: 11
Reputation: 2,691

Post » Tue Apr 10, 2012 4:28 pm

Have you tried using the 'Set animation' action?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Tue Apr 10, 2012 4:32 pm

I think this will do it:
if enemy moving left = set animation to "walk left"
if enemy moving right = set animation to "walk right"
But how could I know when the player is walking left or right?
B
13
S
3
G
3
Posts: 11
Reputation: 2,691

Post » Tue Apr 10, 2012 4:33 pm

I mean enemy not player
B
13
S
3
G
3
Posts: 11
Reputation: 2,691

Post » Tue Apr 10, 2012 5:31 pm

I had done this capx for the very same question a while ago.

Look through the forum there is a topic with more examples and explanations.

Edit: also IMO, sine is not the most appropriate way to do scrolling enemies, but the choice is yours.
Be sure to have a look at the how do I FAQ it has many exmaples listed amongst which making patrolling enemies with platform behavior.Kyatric2012-04-10 17:32:47
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Tue Apr 10, 2012 5:59 pm

what is the best behavior to use in a scrolling enemy?
B
13
S
3
G
3
Posts: 11
Reputation: 2,691

Post » Tue Apr 10, 2012 6:35 pm

@Kyatric BTW I saw and downloaded your tutorial about the patrolling system. I study the event sheet carefully and It make sense to me. Thanks man you save me a lot of time! Keep on helping other newbies osiaslemuel2012-04-10 18:38:33
B
13
S
3
G
3
Posts: 11
Reputation: 2,691


Return to How do I....?

Who is online

Users browsing this forum: Kagubro, Scofano and 22 guests

cron