Hello there ...
I am just curious I want to create a new initialization but in same time I don't want to overwrite the old method
I use exemple the Scene_Map
but I want to add a new call in the initiation definition but without to have to rewrite the whole initialization method...
i am not sure but I think we can use
the alias?
because i am not sure...I never use alias most of time
so for me this method seem a little darky and unknow to me
but if it is not the method to take it exist a way to make a initialization without overwrite the old initialization?
thanks to the people who will answer to my question~
Initialize without overwrite the old initialization?
● ARCHIVED · READ-ONLY
-
-
Yes use alias:
alias old_initialize initialize def initialize old_initialize # call the old method your_stuff endBut be sure to take a unique name for your alias method instead of old_initialize., -
ho okai thanks you so if I want to do this is
alias nio_initialize initializedef initializenio_initializemapping_nameenddef mapping nameendso with that I will not forced to rewrite the default configuration? -
Correct. Alias will create a copy of a method as it is at that time (so the position in the script list matters at this point) and stores it in the new name you provide. Make sure the new name is unique, or you may run into some issues down the road with other scripters and maybe even yourself.
-
thanks you zalll you are always here for help me !Correct. Alias will create a copy of a method as it is at that time (so the position in the script list matters at this point) and stores it in the new name you provide. Make sure the new name is unique, or you may run into some issues down the road with other scripters and maybe even yourself.
and thanks you two for helping me I was a little lost :3 so
nio give you Paper Cookie!