OFFICIAL Tech Blog : Ghosted parent events and object variables

Discussion in 'Announcements' started by Lee Chisholm, Dec 14, 2017.

  1. Lee Chisholm

    Lee Chisholm Member

    Joined:
    Jul 28, 2017
    Posts:
    27
    https://www.yoyogames.com/blog/454/ghosted-parent-events-and-object-variables

    [​IMG]

    "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."
     
  2. BaBiA Game Studio

    BaBiA Game Studio Member

    Joined:
    Jun 20, 2016
    Posts:
    789
    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.
     
  3. Alice

    Alice Toolmaker of Bucuresti Forum Staff Moderator

    Joined:
    Jun 20, 2016
    Posts:
    713
    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...
     
    RichHopefulComposer likes this.
  4. mazimadu

    mazimadu Member

    Joined:
    Jun 21, 2016
    Posts:
    128
    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.
     
  5. RichHopefulComposer

    RichHopefulComposer Member

    Joined:
    Jun 20, 2016
    Posts:
    1,360
    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.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice