• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM [SOLVED] Will a parent object having a sprite affect children?

Dr_Nomz

Member
Will it affect them in any way at all? Or will it basically mean nothing?

Just asking because I need to have it have a sprite or I get an error...
 
I

immortalx

Guest
If it's just a controller object that you put in a room and as long as it's outside the view, I don't see why it would be a problem.
I'm putting sprites in my controller objects (just a single fill color and maybe some text) because I'm having trouble seeing the default question mark icon and never had an issue.
Unless it's something else you need to accomplish.
 

Roderick

Member
Children are exactly the same as the parent, except for any attributes that you override; those replace the attributes of the parent.

So if all children have a sprite, none will ever show the parent sprite. If you want to make sure the parent sprite never shows, set it to a fully transparent sprite, or set the parent alpha to 0, and reset it to 1 on the children.
 

TheouAegis

Member
Children are exactly the same as the parent, except for any attributes that you override; those replace the attributes of the parent.

So if all children have a sprite, none will ever show the parent sprite. If you want to make sure the parent sprite never shows, set it to a fully transparent sprite, or set the parent alpha to 0, and reset it to 1 on the children.
Children share the same EVENTS, not the same attributes. A child with no sprite is a child with no sprite, regardless of what the parent object has. The only time the parent object overrides the child object is if the parent object has code inside an event that the child object doesn't have. It doesn't matter if you set image_alpha=0 or visible=0 in the parent object if the child object has ANY code, including comments, in the same event.
 
Top