GML How i make the character throw itself in the direction of the mouse cursor?

I'm a beginner and the objective is make the character do a "DASH" in the direction of the mouse cursor and just stop when hit a wall for example, but i don't figured out how to make this, anyone could help me?

Thanks in advance.


I would suggest starting by following some of the tutorials. Once you know how to:
  • make an object
  • put it in a room
  • move it around
  • draw it via a sprite or animated sprite
  • accept input from player
  • update its position and state in a Step Event
  • perform collision detection with obstacles like a wall

then you could make a 'character do a dash.

The tutorials will cover those basics: