Help dealing with multiples of the same enemy

Get help using Construct 2

Post » Mon Sep 10, 2012 12:34 am

I'm designing a sidescrolling platformer and I'm having trouble with having multiples of the same enemy. Pretty much my question is when I want to have another instance of the same enemy can I just copy and past via the layers tab? OR Do I need to create a new sprite/event for every single enemy? Sorry if this was already explained in a tutorial, but I was not satisfied with my search results. I am working with the free version currently so cannot use families which is a bummer. Can supply capx if necessary, but I figured this is a simple question.

Whenever I do the copy paste method the enemy gets all buggy.
I really don't want to have to program every enemy to simulate movement and setup collisions.
B
5
S
2
G
2
Posts: 4
Reputation: 1,905

Post » Mon Sep 10, 2012 1:11 am

ImageImageImageImageImageImage
B
93
S
20
G
13
Posts: 1,217
Reputation: 18,998

Post » Mon Sep 10, 2012 1:45 am

Have you followed both beginner's tutorials? This should help cover these basics.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Mon Sep 10, 2012 9:58 pm

I think it has something to do with the uid, but I'm having trouble understanding it all. I went through the jungle platformer and the beginners basics and have skimmed through others, but I'm still having some troubles.

I have an enemy sprite with a walking animation and an enemybox(sprite) overlayed to control its movement/collision.

Since I set every tick>enemysprite>set position to enemybox

Movement/collision of the original(im guessing which ever one gets set to a uid of 0) enemybox is wanting to control all the other enemy sprites.

This results in the animation being mirrored to early and my enemies end up moon walking or disappearing because of a collision with a prior enemybox.

here is my .capx... I'm thinking that I'm missing a condition that tells the enemy to only be controled by the box nearest to it.

http://dl.dropbox.com/u/47111759/FIRST.capx

I tried to work around it by adding spawn points that would trigger when on screen. But if you don't kill an enemy then its box will control all the other enemies(as stated above).
B
5
S
2
G
2
Posts: 4
Reputation: 1,905

Post » Tue Sep 11, 2012 12:15 am

ImageImageImageImageImageImage
B
93
S
20
G
13
Posts: 1,217
Reputation: 18,998

Post » Wed Sep 12, 2012 10:01 am

Hey I had the same problem, how to set animSpirets to their hitboxes. Any calculation on collision or distance faill when they wil cross each other. So I came with my own solution. But am still rokie in construct soo maybe other guys have even better solution which i would like to see also.

Mine thread http://www.scirra.com/forum/hitbox-sprite-workaround_topic56389.html?KW= on at the end is capx provided ..take a look, could help ya.

Martinemte2012-09-12 12:48:36
B
16
S
4
G
3
Posts: 14
Reputation: 3,141

Post » Thu Sep 13, 2012 10:36 pm

Thanks for all the help guys, I got it working now.

Currently trying to figure out how to make it so an enemy might randomly drop(spawn) an item on death and how I can set the drop rate percentage.
B
5
S
2
G
2
Posts: 4
Reputation: 1,905


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests