How do I make a bounding box for swipe scrolling

Get help using Construct 2

Post » Thu Apr 16, 2015 7:52 pm

Message: TheAlchemyst is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
Hey folks, I'm new here and just starting to play with construct 2. My first step was to make the UI.

I followed a tutorial for swipe scrolling, .

It works great, however I am trying to build a dynamic playable area. I have it set to Unbounded Scrolling, and want to use sprites to limit the movement of the "TouchFollowMe" sprite from the tutorial.

However, after several attempts with such tools as Collision events, "Solid" behaviors, etc, I just can't get the "TouchFollowMe" sprite to make a full stop when it hits my "PlayArea" Sprite.

Am I missing something?
Last edited by TheAlchemyst on Thu Apr 16, 2015 7:57 pm, edited 1 time in total.
B
4
S
1
Posts: 3
Reputation: 493

Post » Thu Apr 16, 2015 7:56 pm

I'm not familiar with the tutorial, but would using the clamp expression work to limit the movement?

every tick
touchfollowme set x - clamp(touchfollowme.x, minimum x-coordinate, maximum x coordinate)
touchfollowme set y - clamp(touchfollowme.y, minimum y-coordinate, maximum y coordinate)
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Apr 16, 2015 8:06 pm

Fantastic, thanks! Step 1 down, only 500 steps left to go...
B
4
S
1
Posts: 3
Reputation: 493


Return to How do I....?

Who is online

Users browsing this forum: ErikSwahn and 1 guest