Complex expressions

Get help using Construct 2

Post » Sat Feb 23, 2013 1:33 am

I'm trying to pick objects from a group of objects, and I noticed that you cant add objects to arrays, so I tried something like this:


playerChoice & Player.choiceIndex & .X

where I have some objects like
playerChoice1
playerChoice2
playerChoice3
playerChoice4

I'd like to write something a bit more elegant than a huge block of if statements. I'm used to autohotkey and there you would use a command to evaluate an inner statement to inject into the broader expression. Any idea if this or something equivalent is possible?
B
5
S
1
Posts: 11
Reputation: 420

Post » Tue Feb 26, 2013 7:00 am

I'm not sure I understood the question! But would it help to select the objects by Object.uid? You could store the uid of a clicked object and then use the variable to select the object again.
B
7
Posts: 38
Reputation: 476

Post » Tue Feb 26, 2013 8:12 am

How do you pick an object with an unknown object type even if you know its UID?
B
5
S
1
Posts: 11
Reputation: 420

Post » Tue Feb 26, 2013 8:14 am

@dunebeetle

Put target types into a family, then pick object by this family.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019


Return to How do I....?

Who is online

Users browsing this forum: adi pratama and 25 guests