Destroy oldest spawned object.

Get help using Construct 2

Post » Mon Sep 10, 2012 10:23 am

I'm yet to find a way to do this. :/
B
6
S
1
Posts: 46
Reputation: 844

Post » Mon Sep 10, 2012 11:02 am

A possible implementation using array

In the example, I tried to keep a logic closed to the one you showed in your screenshoot, but in the scope of my example, it makes little sense to check the count AND the global variable to make the stone disappear.

Also, in your screenshot, it picks the newly created instance, it's kind of by design.
You might try to put a "System: Pick all" before this condition, that would "reset" the picked instances.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
258
S
90
G
48
Posts: 7,083
Reputation: 62,882

Post » Mon Sep 10, 2012 12:35 pm

Thanks, Kyatric. I'll have a go when I get back home. Stuck at work atm. :/
B
6
S
1
Posts: 46
Reputation: 844

Post » Mon Sep 10, 2012 6:14 pm

Here is a capx of the methods I wrote about:
http://dl.dropbox.com/u/5426011/examples14/destroy_oldest.capx

I personally like the instance variable solution, it's very clean.
B
84
S
27
G
70
Posts: 4,934
Reputation: 49,560

Post » Mon Sep 10, 2012 8:09 pm

I ended up using Kyatrics method as I think it will be easier to work if I end up building more on this idea. Thank you all for your help and fast replies. :)
B
6
S
1
Posts: 46
Reputation: 844

Previous

Return to How do I....?

Who is online

Users browsing this forum: R0J0hound, Yahoo [Bot] and 2 guests

cron