How do I get enemy AI to mirror independently

Get help using Construct 2

Post » Sat Jun 20, 2015 10:53 pm

I followed the beginner platform tutorial and created a simple platformer game. I set my zombie enemy to set position to a box item, per the instructions. The enemy and box instances go back and forth between invisible trigger items and move back and forth just fine. The only problem is, no matter what I try, I can't get the actual enemy sprite to mirror back and forth independently. When I set the enemy to mirror, all instances mirror instead of one at a time.

I searched through the forums and topics seemed to center on getting the player to mirror. Can anyone help?
B
3
Posts: 6
Reputation: 212

Post » Sat Jun 20, 2015 11:52 pm

You need to specify a zombie instance, probably using an angle of motion check, or with an expression in one of its behaviors (Don't know if you are using a platformer on your AI).
PS
This post is to start a conversation, because I don't think I can help you just with what you gave me! XD
B
7
S
2
Posts: 38
Reputation: 553

Post » Sun Jun 21, 2015 12:24 am

Here's how the event sheet looks.
Image
B
3
Posts: 6
Reputation: 212

Post » Sun Jun 21, 2015 12:39 am

You need to do a two things,
[list=]
[*]Put the Zombie and ZombieBox into a container (See: https://www.scirra.com/manual/150/containers)
[*]Add a for each ZombieBox condition to both your direction="Left" and direction="Right", that will make things work more smoothly.
[/list]
B
7
S
2
Posts: 38
Reputation: 553

Post » Sun Jun 21, 2015 12:40 am

I don't know why that list broke my bad
B
7
S
2
Posts: 38
Reputation: 553

Post » Sun Jun 21, 2015 12:54 am

Thank you so much! That fixed it.

If you don't mind, what's the logic difference that made it work? I can see the need to somehow target an instance of zombie box and zombie. Does the container allow them to work together?
B
3
Posts: 6
Reputation: 212

Post » Sun Jun 21, 2015 12:56 am

A container groups things together so that when an event effects one, the other of objects (in its container) get brought into context. Read the manual post I attached in my second response for more, I'm not the best at explaining
Also I'm glad I could help!
B
7
S
2
Posts: 38
Reputation: 553


Return to How do I....?

Who is online

Users browsing this forum: Magistross, mtnboy22, Rable and 8 guests