Picking two objects by comparison?

Discussion and feedback on Construct 2

Post » Thu Nov 27, 2014 5:48 pm

Hi guys,

I'm finding myself stuck. I basically have a load of two types of object. Each of these objects have a variable called NUMBER. Object type1 has a pair object type2, where both have the NUMBER variable set to the same thing.

Lets say when object type1 collides with an obstacle I want to set the matching pair object type 2 invisible.
i.e.

On [object type1] collides with [obstacle]
Pick [object type2] if [type2.NUMBER] = [type1.NUMBER]
Set [object type2] invisible

How would I do this? It's driving me crazy! :?
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Post » Thu Nov 27, 2014 5:55 pm

Pick by comparison should do it.
ImageImageImage
B
71
S
21
G
230
Posts: 3,688
Reputation: 128,847

Post » Thu Nov 27, 2014 6:21 pm

Unfortunately it doesn't seem to here.

On [object type1] collides with [obstacle]
Pick [object type2] if [object type2.NUMBER] = [object type1.NUMBER]
Set [object type2] invisible


I want these to be the same object. Are they?
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Post » Thu Nov 27, 2014 6:32 pm

Yes. You'll have to post an example, as it should be fine.
ImageImageImage
B
71
S
21
G
230
Posts: 3,688
Reputation: 128,847

Post » Thu Nov 27, 2014 7:17 pm

Ah I think I may have cracked it. After more investigation I found just one pair was working. So I had to add a foreach [object type1]
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542


Return to Construct 2 General

Who is online

Users browsing this forum: paxto22 and 3 guests