GameMaker Object parent

  • Thread starter Deleted member 16767
  • Start date
D

Deleted member 16767

Guest
Why can I only have one parent for an object? Is there a way to have more?
 

Yal

šŸ§ *penguin noises*
GMC Elder
Yes, it's called a grandparent. Objects are treated as special cases of everything they are descendants of, even if it's not directly... e.g. not just their parent, but also the parent of their parent's parent (and so on). Their empty events will run code of their nearest ancestor (and with liberal use of event_inherited you can run the code of ALL their ancestors, if required).
 
D

Deleted member 16767

Guest
Yes, it's called a grandparent. Objects are treated as special cases of everything they are descendants of, even if it's not directly... e.g. not just their parent, but also the parent of their parent's parent (and so on). Their empty events will run code of their nearest ancestor (and with liberal use of event_inherited you can run the code of ALL their ancestors, if required).
Thank you for this information!
 
Top