How do I scroll to an object's unique ID

Get help using Construct 2

Post » Sat Jul 16, 2016 9:59 am

I have a system event that "Set Scroll X" to "Bunny". Only issue is, there's multiple "Bunny" on the map. How do I set the scroll to a specific "Bunny"? I figure there's a way to specify UID, but if there's any other way, I'd be grateful :)

Thanks in advance.
B
25
S
10
G
1
Posts: 154
Reputation: 2,687

Post » Sat Jul 16, 2016 11:05 am

Bunny > pick by UID ... >> scroll to

OR

Give Bunny an instance variable 'TheCenter'. (or boolean)
Set 'TheCenter' to 1 if this Bunny is the center of things, else set it to zero.

Bunny > compare instance variable ( 'TheCenter' = 1) >> scroll to
Or
System > pick by comparisation > Bunny > 'TheCenter' = 1>> scroll to
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sat Jul 16, 2016 3:04 pm

use instance variable this should work fine
B
251
S
39
G
15
Posts: 1,964
Reputation: 40,721

Post » Mon Jul 18, 2016 5:19 am

perhaps you can make an invisible camera, then use "set position"
"If you want to move a mountain tomorrow, you should start by lifting stones today."
B
64
S
14
G
2
Posts: 291
Reputation: 6,666

Post » Mon Jul 18, 2016 6:27 am

Basically, you need to "pick" the bunny you want to scroll to first with conditions. There are many ways to do this, some of which has been mentioned above.

Then when you use the scroll to action for bunny, then it will center the screen on the one that had been picked in that event.
Mistakes were made.
B
52
S
26
G
108
Posts: 1,606
Reputation: 61,133


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, brunopalermo and 27 guests