I do not understand what happens here

Discussion and feedback on Construct 2

Post » Wed Apr 27, 2016 10:59 am

Hello, I have this example in which two objects are collected to see if one of them has reached its destination, so if this is true destiny is changed and moves again.

But this does not work, do not understand why.

I know that could eliminate this:

PICK WITH INSTANCE UID 0
PICK WITH INSTANCE UID 1

But I would like to know why not work with that code.

Image

https://dl.dropboxusercontent.com/u/60803633/test7.capx

Someone could explain this to me?.
B
29
S
12
G
21
Posts: 801
Reputation: 14,453

Post » Wed Apr 27, 2016 11:33 am

it works with that code only if you place the condition with an OR that means any sprite that has uid 0 or 1 will be picked and change direction on target hit... however not having the OR condition will pick only 1 sprite that has the uid equaling with 0 and 1 in same time... which in this case is impossible... since you dont have 2 uid values for one object.

its like saying i have an apple and an orange... but i want to pick a orange that is also and apple :D so the system gets confused and the matrix breaks ..

here is the capx
B
76
S
22
G
69
Posts: 1,353
Reputation: 43,833

Post » Wed Apr 27, 2016 3:48 pm

Then I was confused.

I thought it was like this:

pick instance with UID 0

The system will work with uid 0 object

pick instance with UID 1

The system will work with objects 0 and 1

Ok thanks for the information!.
B
29
S
12
G
21
Posts: 801
Reputation: 14,453


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests