So I'm making a game where you click the mouse button and an object moves towards it, and for a little detail, I want to put a line between the mouse and said object. The mouse will also be moving around so the line needs to stay in between the object and the mouse no matter how far they become. Does anyone know how I can do this?
You need to set the line with these actions in every tick:
- Line set position to object(ImagePoint 0)
- Line set angle = angle(Self.X,Self.Y, Mouse.X, Mouse.Y)
- Line set width = distance(Self.X,Self.Y, Mouse.X, Mouse.Y)
Develop games in your browser. Powerful, performant & highly capable.
Thanks alot! I got it working and it's looking a lot better now.