Hewp

Hello! I have a problem with my flowjam game here. The enemy ship uses a motor, so when you click f to dodge and attack, the ship’s sideways velocity will make it fly away from your avatar! Plez help :slight_smile:

Why not have the forward go into the motor and the 0 go to velocity?
This will let you use motors but stop the ships from going sideways when not moving.

And for the compass, this is what I mean:

Player:
2020.01.15-16.44

Compass:
2020.01.15-16.41

@meburningslime
You either have to import the bundle thats in my example ^^^

Or attach an invisible object to the player that uses point at, and message the output to the compass.

I don’t get it.

When the ship passes you on accident, it will keep on going

Also why iz my compass not working @grazer I tried some stuff but it said that an infinite loop crashed the game :frowning:

what ship?

The compass doesn’t work because your taking the compass X and Y and not the ships X and Y.
The compass is in the UI, which coordinates are with the screen size X and Y and not the game World X and Y.

Use the Angle-To example bundle I made in my examples.
Message that output to the compass.
And just Mailbox --> (set) rotation in compass.

Point-At & Angle-To Example
https://flowlab.io/game/play/1313462

The brown enemy ships. Right now Im using a velocity function, but replace it with a motor and you will see my problem. Also, that doesnt work for my compass! I did it again but it wont work

@“JR 01”

@“JR 01” wouldnt that stop the ships from moving?
As for the compass, Im dumb and stupid thx

yeah thats what your doing rn anyways, just they move forward with the motor instead.
They’ll move using motor and stop with velocity.

@“JR 01” the compass wont work because the coords for UI and coords for GI are different! :frowning:

yes @meburningslime, but you can still message each other
Also use Rotation in compass, not point at.

The compass points toward the center star system
@“JR 01” Like i said in another discussion i cant copy that bundle

Yes @meburningslime, you need to use the “Angle-To” Bundle I made in this example:
Point-At & Angle-To Example
https://flowlab.io/game/play/1313462

and follow the previous images ^

@meburningslime

Just copy and import the bundle into your game:
http://forum.flowlab.io/discussion/comment/33280

Ok i did it in Space Station 1 whats wrong @“JR 01”

and it wont work becuz the compass uses different coords than the sun because its ui :frowning:

It’s because the compass is in the UI that you will have rotation and NOT Point at.

Your actually “Point At” with the player, but this bundle gives the same rotation without actually rotating the player.

Send the compass the rotation that bundle outputs in the player.

I’ll be able to look at it again later this afternoon.

That doesnt workvit rotared the player :frowning: