Limit how far "down" the camera can go?

Get help using Construct 2

Post » Tue Jan 03, 2012 6:02 pm

So what I need is for the ScrollTo plugin to act the same, but I want the camera to only go down so far. Let me explain.
Example (How it should be)


(How it ends up with the System's Scrolling feature)


I want the it to still scroll and follow the player, including when he jumps, or even if he was to fall down below to a lower platform. I just want the camera to be limited to how much "freespace" is shown below the player. Can this be done?DoubleElite2012-01-05 04:49:36
B
16
S
3
G
5
Posts: 43
Reputation: 3,880

Post » Tue Jan 03, 2012 7:55 pm

Get rid of the ScrollTo plugin, it's a shortcut for the system 'scroll to object' action. Just use that instead, e.g. if object Y < 1000 then scroll to the object. Then it will never scroll below 1000 pixels.
Scirra Founder
B
362
S
216
G
75
Posts: 23,119
Reputation: 180,502

Post » Tue Jan 03, 2012 8:26 pm

Ok, so I set it up like this;

System | Player.Y < 200 ----- ScrollTo Player

The problem is that now the system wont scroll when he moves. I'm trying to replicate a 'camera' from this http://www.scirra.com/forum/imfuckincold-wip_topic47701.html
B
16
S
3
G
5
Posts: 43
Reputation: 3,880

Post » Tue Jan 03, 2012 8:45 pm

Did you add the condition to a System Every Tick condition? It works for me like that, i.e.

System Every Tick        System Scroll To Player
Player.X <1000zenox982012-01-03 20:46:21
If your vision so exceeds your ability, then look to something closer.
Moderator
B
123
S
29
G
70
Posts: 4,911
Reputation: 49,523

Post » Tue Jan 03, 2012 11:56 pm

I did as you said, but when he get's near the side, the camera jumps down.
http://dl.dropbox.com/u/8177003/CameraMove.capx Here's a quick setup of my example. Any ideas?DoubleElite2012-01-04 00:51:59
B
16
S
3
G
5
Posts: 43
Reputation: 3,880

Post » Wed Jan 04, 2012 12:20 am

put the file on the public folder and right click on it "dropbox > copy public link"
B
61
S
22
G
14
Posts: 1,480
Reputation: 16,373

Post » Wed Jan 04, 2012 12:52 am

Thanks Yann, updated my post with the new link.
B
16
S
3
G
5
Posts: 43
Reputation: 3,880

Post » Thu Jan 05, 2012 4:47 am

Bump. Update my post with example images, and more info.
B
16
S
3
G
5
Posts: 43
Reputation: 3,880

Post » Thu Jan 05, 2012 5:39 am

New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
253
S
86
G
42
Posts: 7,037
Reputation: 59,189

Post » Thu Jan 05, 2012 5:12 pm

Thank you very much Kyatric! This is exactly what I needed, works great!
B
16
S
3
G
5
Posts: 43
Reputation: 3,880

Next

Return to How do I....?

Who is online

Users browsing this forum: Husui, Ratmaster and 6 guests