How do I Fix my angle of motion

Get help using Construct 2

Post » Fri Feb 19, 2016 1:16 am

I seem to be having an issue with a bullets angle of motion using 8 directional movement, the code I have below is actually working and changes the bullets direction on the horizontal axis (left, right) but it completely ignores the vertical axis (up, down)

Is there no way to have the player.8Direction.MovingAngle encompass all directions instead of just left and right ? or am I just doing it wrong :P

Image
B
62
S
26
G
17
Posts: 82
Reputation: 13,205

Post » Fri Feb 19, 2016 1:40 am

It should work. Try disabling the speed, wait, and disabled actions to test again?
Mistakes were made.
B
47
S
23
G
107
Posts: 1,571
Reputation: 60,133

Post » Fri Feb 19, 2016 2:01 am

oosyrag wrote:It should work. Try disabling the speed, wait, and disabled actions to test again?


Your right, that worked correctly.
But still.. How am I supposed to set a bullet speed if it breaks the player.angle..
B
62
S
26
G
17
Posts: 82
Reputation: 13,205

Post » Fri Feb 19, 2016 2:15 am

Here's a quick capx with the movingangle working as expected.
https://www.dropbox.com/s/haxr1kxufixvn ... .capx?dl=0
See if that works for you?

It might be the wait that is breaking yours, not the speed.
Mistakes were made.
B
47
S
23
G
107
Posts: 1,571
Reputation: 60,133

Post » Fri Feb 19, 2016 2:23 am

oosyrag wrote:Here's a quick capx with the movingangle working as expected.
https://www.dropbox.com/s/haxr1kxufixvn ... .capx?dl=0
See if that works for you?

It might be the wait that is breaking yours, not the speed.



Oh.. I am currently on the stable release.. not beta :( So can't open the file.
Could I just get a screenshot ?
B
62
S
26
G
17
Posts: 82
Reputation: 13,205

Post » Fri Feb 19, 2016 2:28 am

Basically it is the same as you did with the first two actions. Try leaving the speed action there and disabling the wait action and see what happens.
Mistakes were made.
B
47
S
23
G
107
Posts: 1,571
Reputation: 60,133

Post » Fri Feb 19, 2016 2:32 am

oosyrag wrote:Basically it is the same as you did with the first two actions. Try leaving the speed action there and disabling the wait action and see what happens.



Disabling wait only instantly disables the entire bullet action before it even gets to the player.angle lol.

I don't understand why setting the bullets speed after it's angle would break the vertical axis of the bullets angle .. wtf ?
B
62
S
26
G
17
Posts: 82
Reputation: 13,205

Post » Fri Feb 19, 2016 5:22 am

When you disabled wait did you also disable the bullet disable action too?

Try setting a static speed and see what happens?
Mistakes were made.
B
47
S
23
G
107
Posts: 1,571
Reputation: 60,133

Post » Fri Feb 19, 2016 5:39 am

oosyrag wrote:When you disabled wait did you also disable the bullet disable action too?

Try setting a static speed and see what happens?



I have to have the bullet disabled after it goes through that process.
And yes, it works fine with a static speed set on it only I need it to be a random speed..
B
62
S
26
G
17
Posts: 82
Reputation: 13,205

Post » Fri Feb 19, 2016 5:46 am

I think it is the wait that is stopping the event from updating the direction of the bullet. Try having the wait and stop in another event, maybe if Bullet is Moving - Wait 1, Stop Bullet by itself.
Mistakes were made.
B
47
S
23
G
107
Posts: 1,571
Reputation: 60,133

Next

Return to How do I....?

Who is online

Users browsing this forum: newt, Yahoo [Bot] and 5 guests