How do I pick 2 instances separately after returning them

Get help using Construct 2

Post » Thu Feb 19, 2015 7:41 am

ObjectX.InUse is a boolean variable.

Event======>+Pick objectX where objectX.InUse = 1 (This, in my case, will return 2 instances)
Sub-Event==> -pick objectx instance 0 (pick first instance) > do something
-pick objectx instance 1 (pick second instance)> do something

I'm trying to get the first and the second instance of the list that I previously got in the first condition where objectx have two instances with their InUse variable = 1, so it will retrieve 2 instances. However, it's not working because i'm getting the first and the second instances of all instances. How can I separately pick these two instances regarding to the first condition?
B
45
S
19
G
3
Posts: 576
Reputation: 6,058

Post » Thu Feb 19, 2015 9:22 am

So you want to pick 2 instances and handle them separately ?

You can do :
pick objectX by comparison
for each objectX
And you just have to add sub-conditions to separate them like : if UID = 0… then, if UID = 1… then, Or maybe just using an incrementing variable).
You do not have the required permissions to view the files attached to this post.
B
12
S
7
G
7
Posts: 447
Reputation: 4,270

Post » Thu Feb 19, 2015 4:15 pm

Coin-coin le Canapin wrote:So you want to pick 2 instances and handle them separately ?

You can do :
pick objectX by comparison
for each objectX
And you just have to add sub-conditions to separate them like : if UID = 0… then, if UID = 1… then, Or maybe just using an incrementing variable).


Thanks, I'll try it later. :D
B
45
S
19
G
3
Posts: 576
Reputation: 6,058


Return to How do I....?

Who is online

Users browsing this forum: mrtumbles, Pulstar, theagoliddell and 15 guests