OFFICIAL Tech Blog : Ghosted parent events and object variables

L

Lee Chisholm

Guest
https://www.yoyogames.com/blog/454/ghosted-parent-events-and-object-variables



"The 2.1.3 update to GameMaker Studio 2 is out and along with the usual batch of stability improvements, bug fixes and IDE tweaks, there have been two new features added: Ghosted Parent Events and Object Properties. These are new features in the IDE related to how you can interact with objects, and while they don't change anything fundamental with how objects work, they are definitely quality-of-life improvements that make using objects easier."
 
Very nice blog explaining everything. I hadn't quite grasped everything that had been changed by the latest update (been unable to try it out yet) by reading the forum posts, so a well-detailed explanation is just great to be able to reference back to if needed.
 

Alice

Darts addict
Forum Staff
Moderator
Oh, the object properties actually sound pretty useful, especially considering how they're assigned before the object calls its Created event. With them being editable through Room Editor, they can be essentially used as constructor parameter of sorts. If only there was a way to set them through one of instance_create() family functions, I dunno, as a ds_map or something...
 
M

mazimadu

Guest
I'm actually more interested in seeing how this can be used alongside the draw event.

You see, objects in the room editor are not drawn and are represented by their assigned sprite. If we can have the first frame of the object show as it would during the draw event (or pre-draw event) we can then edit the objects as they would appear in the room instead of guessing how they would look.

I would love to see this possibility explored. You could assign the image_index to an object variable and scrub though the frames instead of coding it through the creation code and hoping you were correct. Would help with pesky drawn objects like ropes, menus and skeletons.
 
This is good stuff. Great work!
I do agree with Alice that it'd be awesome to set these object variables in a constructor type function, though. That's one of the main things I've been missing in GM since I started using it.
 
Top