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
30
S
12
G
1
Posts: 167
Reputation: 3,038

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
29
Posts: 2,493
Reputation: 21,450

Post » Sat Jul 16, 2016 3:04 pm

use instance variable this should work fine
B
269
S
52
G
16
Posts: 2,044
Reputation: 44,067

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
68
S
17
G
3
Posts: 293
Reputation: 7,430

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
61
S
30
G
134
Posts: 1,964
Reputation: 75,430


Return to How do I....?

Who is online

Users browsing this forum: manujorgo, mongoose665 and 3 guests