Question - IDE Undo overide parent event

Discussion in 'GameMaker Studio 2 Community Tech Support' started by YoKoNo, Feb 7, 2019.

  1. YoKoNo

    YoKoNo Member

    Joined:
    Mar 12, 2018
    Posts:
    26
    Hi

    So I have a parent obj which I have a child from, In the child events I accidentally created a new event which overwrites the parents events. I know I can use the function event_inherited(); in the code editor, but is there a way I can just undo the action? ctrl-z has no effect.

    Thanks

    Paul
     
  2. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    4,447
    Just delete the event in the child.
     
  3. YoKoNo

    YoKoNo Member

    Joined:
    Mar 12, 2018
    Posts:
    26
    so it wont appear as greyed out but will still be pulled from the parent?
     
  4. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    4,447
    Once you delete the event in the child you should see the same event greyed out which signifies that it exists in the parent (and will be run unless otherwise specified).

    In the image below the Key Press event doesn't exist on the child object and so will be called in the parent object, the rest will be called on the child object unless event_inherited() is specifically called.

    [​IMG]
     
    YoKoNo likes this.

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