how to determine when an area is already populated

Get help using Construct 2

Post » Sat Mar 22, 2014 12:12 am

Here an example of what i evented togther running-
Detecting Occupancy

HERE IS THE EVENT SETUP

Setting the boolean instance variable for checking--
Image

In the event sheet a while loop was created to look until a spawner instance variable for occupy was 'false' and once it placed something there is switched it to say something was there. When the object destroyed itself it re-selected the spawner that created it cause it was overlapping and change the Boolean for occupy variable back to 'false'.

Image

I can only assume that this is what you want couldn't open you capx... guess you have the beta version installed. But if so you can look over this.

A few areas can be fixed for redundancy but 'Families' would make it more cleaner.
B
23
S
4
G
2
Posts: 364
Reputation: 2,392

Post » Sat Mar 22, 2014 12:26 am

I have the free version so families are out of the question.
I will look this over and see if I can wrap my head around it and incorporate your direction into my own project.
Thank you so much for responding.
B
7
S
2
Posts: 158
Reputation: 1,021

Post » Sat Mar 22, 2014 3:58 am

Here it is with all of them in one sprite. I didn't understand your timer, so it's currently disabled, and wait statements are the delays while on and while off.

edit: Actually if you delete everything but that one event, it runs exactly the same.
You do not have the required permissions to view the files attached to this post.
B
242
S
63
G
33
Posts: 903
Reputation: 40,756

Post » Sat Mar 22, 2014 10:24 am

That's EXACTLY what I was looking for!
I have been struggling with this for days trying to figure it out.
Thank you so much Paradox!
Learning as I go thanks to people like you

So simple. I knew there had to be an easier and more efficient way of doing this.
B
7
S
2
Posts: 158
Reputation: 1,021

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 27 guests