Separate animations of the same kind of enemies

Get help using Construct 2

Post » Fri Jul 06, 2012 6:57 pm

Hello People!

I hope this is the right place to ask. I'm quiet new to C2 but I'm learning fast, but I have a logical problem that I hope someone can help me with.

I'm using the free version so I have to keep the game within 100 events. So basically I want to separate the animation of the same kind of enemies so when each of them hits an invisible barrier to turn around don't mess up each others animations.

Enemy movement and direction change basics now:



I'm sure there is some simple way to do it, so if anyone has an idea I happy to take it.

I could approach the problem to set an individual variable to all of the enemy boxes separately, and check it which one of them hit the barrier and only change his animation. But is there another simpler way to do it?Serpens2012-07-06 19:09:18
B
3
Posts: 4
Reputation: 433

Post » Sat Jul 07, 2012 12:02 am

Basically I want to achieve that one sprite (the enemy animation) can be duplicated and be animated separately from other duplicates.

Yet I can only do it with adding additional sprites and events per enemy, and that's not only waste of resources but messing up my plans too due to the free version limitation of 100 events.

So anyone any idea besides that I should buy a license?
B
3
Posts: 4
Reputation: 433

Post » Sat Jul 07, 2012 12:07 am

How about adding a "For each" loop? Add the condition "System: For each 'Enemy'" to go through all the 'Enemy' instances. If that doesn't do the trick, could you maybe upload a .capx to dropbox so we could have a look?
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sat Jul 07, 2012 12:51 am

Ahh I spent less time with more complex problems in my life. I couldn't get it to work with a for each loop either, so here is problem in a capx.

http://naia.hu/dev/duplicate_sprite_animation_problem.capx
B
3
Posts: 4
Reputation: 433

Post » Sat Jul 07, 2012 2:09 am

Ah, I see the problem. Here's one way to do it, hope it helps:

PickingAnimation.capx (r98)
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sat Jul 07, 2012 2:49 am

Nice job! I surely learnt from this. Thank you!

BTW I only used two animations instead of mirroring because I can't mirror up/down patrolling animations.

This should be in the FAQ list too. Useful to animate multiple enemies in 8Direction behavior.
B
3
Posts: 4
Reputation: 433

Post » Thu Aug 02, 2012 8:54 pm

Thanks Nimtrix,

It's exactly what I was searching for, inclusive, a better explanation about how to handle different identities with the same animations would be great on the Tutorial section ^^
ImageImageImageImageImageImage
B
93
S
19
G
12
Posts: 1,209
Reputation: 18,369


Return to How do I....?

Who is online

Users browsing this forum: BipolarMike, Televangelist, totoe and 21 guests