# How do I move an object forming an imaginary rectangle.

0 favourites
• 12 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
• Hello there!

I want to make an object Realize a route as follows:

O---O

| |

O---O

O--->Object

So forming an imaginary rectangle.

How can I do?

brunopalermo

• Sorry don't understand. Give me more detail plz

• I made a diagram to better understand

• Something like this would work:

give the sprite 8 direction behaviour set to 4 directions

give the sprite an instance variable Direction

Sprite if variable direction = 1 - simulate pushing right

Sprite if variable direction = 2 - simulate pushing down

Sprite if variable direction = 3 - simulate pushing left

Sprite if variable direction = 4 - simulate pushing up

sprite compare x = more than 400 <-- (or whatever number you want)

sprite if variable = 1 - sprite set variable to 2

sprite compare y = more than 400

sprite if variable = 2 - sprite set variable to 3

sprite compare x = less than 100

sprite if variable = 3 - sprite set variable to 4

sprite compare y = less than 100

sprite if variable = 4 - sprite set variable to 1

• You mean something like this

• Much like the movement I want to achieve Lordshiva1948

Only I want you to form 90 degree angle between straight and straight.

• I am so sorry I still do not understand but, using Bee demo I thin you should be able to work it out. If not then give me good explanation so I would understand what really you want. Thanks

• ## Try Construct 3

Develop games in your browser. Powerful, performant & highly capable.

Construct 3 users don't see these ads
• Sorry for the delay, I was out of town for the weekend.

Is this what you're looking for?

[attachment=0:jups589u][/attachment:jups589u]

• Or you can use THIS version to have not only square movement, but, also, rectangular. Just set horizontalDistance and verticalDistance to the same value if you want it square and to different values if you want a rectangle...

[attachment=0:hubzbcmq][/attachment:hubzbcmq]

• Excuse my poor English. I wanted to do exactly what brunopalermo did.

Thank you very much for helping Lordshiva1948!

Brother you are a hacker! Was that what he wanted to do!

Thank you very much!

• The reputation thing must be skewed