Set Direction Fixed Icon Set Direction Fixed

This action is used to set a fixed movement direction. The available directions are indicated by the different buttons in the action block, and clicking on any of them will set that direction. Note that directions in GameMaker are measured in degrees, with right being 0°, up being 90°, left being 180° and down being 270°.

 

Action Syntax:

Set Direction Fixed Action

Example:

Set Direction Fixed ExampleThe above action block code checks for a left mouse button press on the instance and if one is detected it sets the direction to down (270°) and the speed to 5.