GameMaker GML Visual - Jump To Start
In this video we are learning how and when to use Game Maker GML Visual Block which is called:
Jump To Start
This block is part of the Movement group of blocks and it is used when you want to move some Object to it's previous - start position on the Screen.
It is in the third row, first from the left, red color and it has curved arrow line on it as icon.
It has only one option which is visible when you press drop down arrow.
Applies To... - Self / Other / All / Objects
And here you can pick which Object will Jump To Start, is it the one you put your code into, or some else.
In this video I am showing you how to add same code to different Objects, first Player, then Enemy Object.
Just to know how Objects can work, what is possible in GameMaker and programming in general.
That way you can approach your future problem from different perspectives and be more relaxed on finding the solution.
It really doesn't matter much for smaller games as long as your game works decently.
But on the long run, the more complex your game become, you would have to take more care where do you put your code into.
5:50 - adding Jump To Start Block to Player Object
7:55 - adding Jump To Start Block to Enemy Object
14:45 - combining Jump To Start Block with Set Lives and If Lives Blocks
In our game we want to make Player character Object go back to it's starting position when it touches enemy Object.
It's like some kind of reaction to enemy hit or Player life loss when Player starts level again from the starting position.
But you can also make more complex and interesting game mechanics 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 !!