How do I Create a Specific Object from a Family?

Get help using Construct 2

Post » Thu Feb 11, 2016 7:18 pm

Hey,

So I have a family called Enemies, and on different levels I want to spawn specific enemies. For example on level 1 I only want enemies 1 and 2 to be created. On level 2 I want enemies 1, 2, and 3 to be created. I currently create the the sprites in a function but now realize I don't know how to specify which enemies I want to create.

Is there some other way I should approach this?

Thanks!
B
5
S
2
Posts: 4
Reputation: 458

Post » Thu Feb 11, 2016 7:22 pm

You just create the actual object type, so decode the numbers to each type.
ImageImageImage
B
71
S
21
G
211
Posts: 3,614
Reputation: 119,147

Post » Thu Feb 11, 2016 10:51 pm

Okay, so is there a point to even use a family for this situation? When I create the enemy I change their bullet behavior angle of motion depending on which direction I want them to move. I currently have the bullet behavior as a family behavior.

What I like about the family part is that it randomly chooses between all members of the family, but I want to exclude a certain family object for a certain time.

I can put together a basic capx of it if that would help
B
5
S
2
Posts: 4
Reputation: 458

Post » Thu Feb 11, 2016 11:03 pm

Yes, Families are good in general, there is just no way to create a specific object.
ImageImageImage
B
71
S
21
G
211
Posts: 3,614
Reputation: 119,147

Post » Thu Feb 11, 2016 11:20 pm

Okay, thanks for your help
B
5
S
2
Posts: 4
Reputation: 458


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests