How do I limit a sprite object to have mve only on the edges

Discussion and feedback on Construct 2

Post » Sat Jan 16, 2016 3:09 am

I have a sprite object which I want to move only on the layout edges on solid objects.
Have behaviors added to my sprite object: Solid, bound to layout, 8 direction.

But still the sprite moves on the complete layout where as it should move only on the solid surface.

Is it that we will have some options in custom movement ?
B
4
S
1
Posts: 3
Reputation: 306

Post » Sat Jan 16, 2016 2:59 pm

I think you're misunderstanding what the solid behavior does. You don't need it on your sprite object to begin with--8 direction already interacts with solid objects. So you OTHER objects (think of boundaries) should have the solid behavior. These are what you use to define where the player can or can't move.
B
100
S
36
G
16
Posts: 947
Reputation: 16,219

Post » Sat Jan 16, 2016 11:48 pm

Hi,
It moves as expected. But I want to limit the movement only to the edges.
It should not be able to move on the complete canvas.
I want to limit the movement of my sprite to only edges where I have solid behavior. And I move the sprite with keyboard control up/down/left/right.
B
4
S
1
Posts: 3
Reputation: 306


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests