Blockland Forums > Modification Help
Parent-Child relations
(1/2) > >>
Greek2me:
So I created a scriptObject using the code below:

--- Code: --- %this.Mini = new scriptObject()
{
class = SlyrMinigameSO;
superClass = MinigameSO;
};

--- End code ---

What I want to happen is that when someone packages a function like MinigameSO::Reset() that packaged function is also called when SlyrMinigameSO::Reset() is called. Is that possible?
Nexus:
Make SlyrMinigameSO::Reset() call MinigameSO::Reset()

If you do not actually want MinigameSO::Reset() to be called, you can call the function with an argument, then of course edit MinigameSO::Reset() to do nothing when that variable is true.  I do not think simply packaging and returning will work, since that will still break alot of functions triggered by MinigameSO::Reset(), but I am honestly not sure if that is the case.
comr4de:
I legit expected a topic about how your parents beat you or something
Greek2me:

--- Quote from: comr4de on September 22, 2011, 10:53:50 PM ---I legit expected a topic about how your parents beat you or something

--- End quote ---
hahaha I was waiting for that


--- Quote from: Nexus on September 22, 2011, 10:36:33 PM ------

--- End quote ---
Do you know if there's a less hacky way to do it?
Nexus:

--- Quote from: Greek2me on September 22, 2011, 10:57:14 PM ---hahaha I was waiting for that
Do you know if there's a less hacky way to do it?

--- End quote ---

If you want all the things that package minigameso::reset() to be called, then it is inevitable that you also call minigameso::reset()

Beyond that, there are a number of ways you can make it so minigameso::reset itself doesn't actually do anything when called, and I gave you a few examples.

You do not really have that many options with the method you use to accomplish this.
Navigation
Message Index
Next page

Go to full version