F
fastermastercaster
Guest
So very simple issue thats more of a coding pet peve than anything. Basically the parent of an object has creation code that is semi long and nothing needs to be changed except for a few variables. So when the child has a create event with "event inherited" even when the code after sets the variable to something different, it doesnt inherit it. Which forces me to copy the create event code in the parent and paste it into all the children only changing 1 variable. i cant remove the variable in the parent object or it crashes. so i need to "override" the parents variable in the child. gamemaker doesnt do this automatically and just ignores the child create event as if its not there. the manual page on event_inherited shows an example of a switch statement doing this exact thing but the issue is i dont need a switch statement here, just setting the variable, and i have no if statement to use because its not depending on anything, i just need it to be set when created.
TL;DR
Parent create event
child create event
Output: everything is inherited in the child and blah = 0. i just need blah = 1
TL;DR
Parent create event
Blah = 0;
//other variables and stuff
child create event
event inherited();
Blah = 1;
Output: everything is inherited in the child and blah = 0. i just need blah = 1