Gamemaker Basics
🔴 Instance ID [Game Maker Studio 2 | Basics]
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
Add comment