GameMaker Studio 2 D&D blocks - Draw Self
In this video we are learning how and when to use Game Maker Studio 2 Drag and Drop Block which is called:
Draw Self
This block is part of the Drawing group of blocks.
It is in the first row, first from the left, with "Draw this instance's sprite." description on it.
As always you just need to drag and drop it to start using it.
But as we said in last video - be careful because Drawing blocks must be used only in Draw Events !!!
Otherwise they will not show up text or number value on screen or some errors will be created in the game.
In previous video:
GameMaker Studio 2 D&D blocks - Draw Value
https://youtu.be/re1FL8_xOMg
We have created some text and numbers as value on the screen, which is nice.
But we somehow made our game object (coin) invisible, our Sprite for it is not showing on the game screen now, we see text only ?
That is why we need this Draw Self D&D block, and that is exactly what it is going to solve for us.
By adding this D&D block on some Object it will show us Sprite of that Object's instance in the game, on the screen.
It will show itself, sprite graphics, not just the text and numbers as values.
Otherwise, if we forget it, instance's sprite will be invisible, and that is error most of the beginner programmers in GameMaker Studio 2 make.
They just forget to add this block onto the game Object needed when they code.
It's not a big deal but it will happen from time to time, even for more experienced users.
1:00 - GameMaker Studio 2 Drawing workflow and possible errors
3:47 - adding the Draw Self block into Draw Event
4:55 - explaining Relative checkbox for Draw Value D&D block from previous video
5:54 - explaining how Sprite pivot point affects the value which is drawn on screen through Draw Value D&D block
Ok, so now we have coin showing up on the screen with some values for it.
Not too much, but it is some progress and will be useful for our game final look !
Still lot's of work, still lot's of features to add so don't relax.
Just keep on learning !!!