GameMaker GML Visual - Set Direction Fixed

Subscribers:
499
Published on ● Video Link: https://www.youtube.com/watch?v=JDR7cECE2_k



Duration: 14:21
796 views
8


In this video we are learning how and when to use Game Maker GML Visual Block which is called:
Set Direction Fixed

This block is part of the Movement group of blocks and it is used when you want to move some Object in specific - fixed Direction.
It is in the first row, first from the left and it has four arrows on it as icon.

It has eight possible buttons, for us to pick or change to our needs.
Up, down, left, right, and four buttons for diagonal movement.

We add this block to our Enemy Object by adding Set Direction Fixed block into Create Event.
Again be careful in which Event you add it - Create and Step Event do not behave the same !
In my game I am going to put it into Create Event since I want to trigger it only once, on creation of the Object.

Also, it is very important to be careful where in code you put this block, above or below some other block if you have more of them.
GameMaker, as most other game engines too, reads code from top to bottom, and it executes code that way too.
When your games and code become bigger and more complex this can be tricky but just think about it and use logic, it will become easier with more experience.

3:31 - ideas on when to use Set Speed Block
5:42 - adding Set Direction Fixed Block to enemy Object
8:10 - changing Block position (above or below other block) changes game !!!

You can use this block whenever you want game Objects to move in very specific direction.
Like enemies patrolling or following/chasing player, etc.
But you can also make more complex moves with it by combining it with other blocks and code.

More videos on GameMaker GML Visual coming soon, but don't wait - keep on learning !!







Tags:
GML Visual Set Direction Fixed
Set Direction Fixed
GameMaker GML Visual
GML Visual
GameMaker GML Visual Blocks
GML Visual Blocks
GameMaker
GameMaker Studio
GameMaker Drag & Drop
GameMaker Studio D&D
Knowledge For All
K4A