How do I change direction of movement

Get help using Construct 2

Post » Mon Aug 21, 2017 7:37 am

This may be a little hard to explain but I'll try my best.

When you click on any object in the center there is a small box with a line connected to a white slightly larger box. My post has to do with the white slightly larger box.

First of all, what is it called? What all can it do? From my understanding this is the direction that the sprite will move when given the bullet behavior.

By default it is always pointed to the right. The only way I know to change this is to drag it and move it say 180 degrees so it is pointing to the left. The only problem with this is that I then have to change the animation of the sprite 180 degrees as well.

It just seems like I am missing something or that there is a better way. Any suggestions?
B
3
S
1
Posts: 5
Reputation: 339

Post » Mon Aug 21, 2017 8:17 am

Hi @adamebastin !

As long as I know, there is no way to prevent the animation to rotate according to the angle of its object. However, there are ways to move an object in a direction ignoring its current angle. So the question is, what type of move do you want your object to do?
Image
B
10
S
3
G
2
Posts: 81
Reputation: 1,735

Post » Mon Aug 21, 2017 8:38 am

Very interesting. I did just discover that it was the angle that I was referring to.

Well the thing is I have a sprite that has animations like "move right" and "move left". So they look different depending on if they are moving left or moving right.

I like your suggestion. What are the easiest methods to move an object in a direction ignoring its current angle?

I was just going to use it for an enemy. It was going to move left once the player is in its LOS.
B
3
S
1
Posts: 5
Reputation: 339

Post » Mon Aug 21, 2017 10:55 am

Based on 8-direction behavior, once you've set the property "Set Angle" to "No" within the behavior, you can make events like those. ;)

Image
____________________________________________________

You can also make movements with "Custom Movements", "Platform" and "Bullet" behaviors. It's up to you to choose the one that fits your needs the best.
Image
B
10
S
3
G
2
Posts: 81
Reputation: 1,735


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 29 guests