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
4
Posts: 46
Reputation: 617

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
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

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
4
Posts: 46
Reputation: 617

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
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

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
4
Posts: 46
Reputation: 617

Previous

Return to How do I....?

Who is online

Users browsing this forum: armaldio, plinkie and 19 guests