Help Needed With Containers

For questions about using Classic.

Post » Thu Apr 21, 2011 11:24 pm

Hi All,

I'm having some issues with containers. I have a custom collision box for the enemy soldiers in my game. However, the box doesn't delete itself when each soldier dies. I added them to the same container, with the understanding that it would add the above functionality.

CAP: http://files.me.com/steven.foskett/gzkcat

How can I fix this?
B
1
G
1
Posts: 1
Reputation: 427

Post » Fri Apr 22, 2011 12:15 am

To quote the wiki:

[quote:uj3k7n3q]When Spawning one object in a Container, new instances of the other objects in the container are automatically spawned and paired up. [/quote:uj3k7n3q]

In your EnemyMechanics event sheet you do create both though, the enemy solider itself AND the hitbox. This is resulting in the double amount of enemies and hitboxes you intend to have. And will eventually lead to some kind of mess.

Just spawn only the enemy with the event and set the hitbox always to the enemy position. This should result in correct behavior.

And welcome to the forums btw! :)
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests