Retaining picked objects

Get help using Construct 2

Post » Sun Jan 13, 2013 6:35 pm

Couldn't think of a good description for this, but I imagine it comes up fairly often and there's a solution, but my brain isn't working today and I'm not sure what to search for in the forums.

I have a situation where I need to check through a bunch of tiles, and if they meet a certain condition, they spread that condition to neighbouring tiles.

So I'm doing....

Tile > Has condition.
Neighbouring tile > Apply condition.

The problem is that once I need to do this in a single pass, so that ALL tiles in the initial pick will spread the condition (but not the new ones). So when I find the neighbouring tile, I lose my list of picked objects from the above event - it just reduces it down to the single tile. So that puts an end to the event.

As I say, I'm sure there's a better way of doing this, but what I basically need to do is to retain my list of picked objects from the top event while still somehow picking a single object of that type in the subevent.
B
25
S
5
G
3
Posts: 446
Reputation: 5,633

Post » Sun Jan 13, 2013 7:43 pm

Here is a quick demo, is this something you are trying to achieve?

Infection Demo
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

Post » Sun Jan 13, 2013 8:15 pm

I'll tell you in a sec if I can work out where version 115 is, I'm on 114 and the updates page only seems to have 114....
B
25
S
5
G
3
Posts: 446
Reputation: 5,633

Post » Sun Jan 13, 2013 8:20 pm

You can find beta releases here, do keep in mind it is beta though. Never had any problems myself, just reminding :)
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

Post » Sun Jan 13, 2013 8:23 pm

R115 is the newest beta.

You have the links to the beta and stable release at the very bottom of each page.

I'm not sure exactly what your issue is, so when asking questions, please join a capx to make it easier to provide help seeing how you set things up so far.Kyatric2013-01-13 20:24:14
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: 6,998
Reputation: 57,791

Post » Sun Jan 13, 2013 9:54 pm

Ah yeah, that's what I was thinking, set a variable and enact the spread afterwards. I think it's the only solution, thanks for the cap :)
B
25
S
5
G
3
Posts: 446
Reputation: 5,633

Post » Sun Jan 13, 2013 11:27 pm

Actually your capx does contain that answer I was looking for. Basically I wanted to know if I could repick the same objects without ruining the initial pick, I see that I need to do a 'Pick all' before the 2nd search. It wasn't so much that the 2nd search was spoiling the first one, more that the 2nd search couldn't find any matches because the first had already limited the search to nothing.farflamex2013-01-13 23:29:25
B
25
S
5
G
3
Posts: 446
Reputation: 5,633


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Braus, supreme676 and 8 guests