🔴 Instance ID [Game Maker Studio 2 | Basics]

🔴 Instance ID [Game Maker Studio 2 | Basics]

Channel:
Subscribers:
9,720
Published on ● Video Link: https://www.youtube.com/watch?v=IXSIrbOtbGg



Duration: 16:04
8,348 views
175


This basic must know tutorial shows you why you should know what an object, instances and the instance id is in gamemaker studio.

Why is that so essential?
Without that knowledge you cannot change the behaviour between instances which have been spawned by their ojbect. The id is the key to access targeted instances.

To make is super short: An object is basically only a template which has specifc attributes and behaviors (events). To use all of that you create instance(s) of this object which are unique and indentified by their given id number. That is being stored in the inbuild variable id. This id is being need to access one of those instances to change it.

Image your player instance is bumping into and enemy instance. There (in then enemy instance) you can have a collision which returns the player id. With that id (of the player) the enemy instance can now change the healthpool of the player by substracting some of it. Something like this - id.health -= 1;

Critters in the thumb used: GrafxKid CC0
https://opengameart.org/content/crazy-critters

▶ Gamemaker Studio: https://www.yoyogames.com/get

▶ Trial limitations: https://help.yoyogames.com/hc/en-us/articles/230407528-GameMaker-Studio-2-Trial-Limitations

♥ My free game Clunky souls:
https://1up-indie2.itch.io/clunky-souls
♥ My assets:
Get some assets at itch.io https://1up-indie2.itch.io/

♥ Support me and get fresh game art and game maker projects every month:
https://www.patreon.com/1upindie


Follow me on:
https://www.instagram.com/1upindie
https://twitter.com/1upIndie
https://discord.gg/gvr98nb







Tags:
gamemaker id
gamemaker instance id
game maker get instance id
game maker object id
gamemaker studio id
gamemaker studio 2 instance_create
gamemaker studio 2 instance id
gamemaker studio 2 get instance id
game maker tutorial
game maker studio tutorial
gamemaker studio 2 tutorial