use variable of instance ID stored in a variable

Get help using Construct 2

Post » Mon Jan 16, 2012 1:27 am

The title is messed up... But I have a problem.

I want to store the unique ID of an instance in a variable, and then use that variable to get the position of the instance whom ID is stored.

I know how to store the other instances ID, but when I want to use it I get an error saying my variable isn't an object name. I don't want it to be an object name!
B
4
Posts: 16
Reputation: 482

Post » Mon Jan 16, 2012 1:37 am

If I understand correctly, this and that topics should shed some light.

If you still need help, please provide a capx and explain a bit more what you're trying to achieve.

Your answer is probably to use a condition "sprite: compare instance variable".
But the reading of the topics should be taughtful.Kyatric2012-01-16 01:39:12
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 » Mon Jan 16, 2012 1:57 am

hm, I didn't really understand the links you gave me.

But I uploaded a .capx file of what I want to do.
owners.capx

I know I could just copy the X-position onto another object. But if I want to use alot of different instances of the same object, and lots of variables, this will be a pain.
Is there any way of using what I like to call owners?joelsandberg2012-01-16 01:57:35
B
4
Posts: 16
Reputation: 482

Post » Mon Jan 16, 2012 2:20 am

fixed

The explanation is in the first post I linked.
Picking with the UID.
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 » Mon Jan 16, 2012 2:33 am

ah thank you!
I'll try this out!
B
4
Posts: 16
Reputation: 482


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 23 guests