Remove object from family

Get help using Construct 2

Post » Thu Oct 24, 2013 9:02 am

Hi,
How to remove object from family ? Or tell me the same function to solve my problem.

Look at screenshot,


When random sprite falling down to the Sprite (red) current sprite must be stopped and new random sprite from the family must be created on the top. Like tetris!
But keyboard function and other things are active for ALL instances of Family1, but I need it's worked only with new created instances.

I create Family1.Destroy function for testing, it's work fine, but I don't need deleting old instance because it must stay at the ground like physical object.

I hope I explained my problem. Sorry for my english.Stalker1142013-10-24 09:04:59
B
3
Posts: 2
Reputation: 179

Post » Thu Oct 24, 2013 9:13 am

You could a boolean variable to the family. we'll call it isfalling and set it to true.

When the sprite reaches the ground set the variable to false.

add a condition keyboard events
family compare boolean isfalling is true
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Oct 24, 2013 9:23 am

Awesome answer, it's very easy solution and it's works!!!

Thanks
B
3
Posts: 2
Reputation: 179


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 18 guests