Remove object from family after created

Get help using Construct 2

Post » Mon Nov 18, 2013 7:25 pm

Hello C2-ers...(?) :P

So in my project I'm currently doing the following...

Every x seconds
Create random object from family x
Random object is then either destroyed by colliding with the player object, or is destroyed offscreen

For the life of me, I can't figure out how to only create a single instance of each object from the family. Once each object is created/destroyed once, the round needs to end.

Any help would be immensely appreciated!

Thanks,
HG
B
5
S
2
Posts: 7
Reputation: 578

Post » Mon Nov 18, 2013 9:51 pm

You can't modify families ingame.

Simplest option would be putting all sprite objects into one sprite (each sprite having its own frame - or if it is animated: animations) and add something like this:
http://www.scirra.com/forum/random-frame-uniqe_topic80520.html

If that is not possible (because of the sprites having different behaviors that would collide with each other), you probably need many subevents, 1 for each object to be created.mindfaQ2013-11-18 21:52:47
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Post » Thu Nov 21, 2013 3:06 am

Try creating each object manually (don't think there's an easy way to make one of each family member). Any object can be destroyed with the handy Destroy action, then you can end the game by checking System -> FamilyName.Count.MoscowModder2013-11-21 03:07:10
B
9
S
1
Posts: 98
Reputation: 853


Return to How do I....?

Who is online

Users browsing this forum: Jackriduk, Username05 and 29 guests