GameMaker GML Visual - Set Speed

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



Duration: 19:09
216 views
2


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

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

It has three possible option fields, for us to pick or change to our needs:
Type - Direction / Horizontal / Vertical (to move in custom direction, up or down)
Speed - number (higher number to go faster, negative or positive changes direction to left, right, up or down)
Relative - checkbox

In this video we make simple enemy character for our game (sprite and Object).
Our game needs active enemies, enemy has to move - so we need to add some code into our Enemy Object.
We can do that easy in GameMaker Studio just by using Set Speed block and adding it into Events.
But be careful in which Event you add it !
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.

5:25 - adding Set Speed Block to enemy Object
12:50 - adding Set Speed Block to Step Event instead of Create and checking Relative checkbox

You can use this block whenever you want game Objects to move simple, linear, fast.
Like bullets, enemies, obstacles, elevators,...
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 Speed
Set Speed
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