| Blockland Forums > Modification Help |
| Parent-Child relations |
| << < (2/2) |
| Greek2me:
I guess I could just get rid of SlyrMinigameSO entirely and just use MinigameSO, checking that it's a slayer minigame, but are there any other methods you can think of? |
| Eeposs:
--- 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 --- Lol'd. |
| Amade:
--- Quote from: Greek2me on September 22, 2011, 10:57:14 PM ---Do you know if there's a less hacky way to do it? --- End quote --- parent::reset(%mini, %winner); |
| Nexus:
--- Quote from: Amade on September 23, 2011, 01:49:52 AM ---parent::reset(%mini, %winner); --- End quote --- That still won't call the packages of minigameso::reset() just the slyrminigameso::reset() |
| Amade:
--- Quote from: Nexus on September 23, 2011, 02:01:51 AM ---That still won't call the packages of minigameso::reset() just the slyrminigameso::reset() --- End quote --- I tested this out because I wasn't sure. Executing the following code: --- Code: ---$FooBar = new ScriptObject() { superClass = "Foo"; class = "Bar"; }; function Foo::DoStuff(%n) { echo("Foo!" SPC %n); } function Bar::DoStuff(%n) { parent::DoStuff(%n); echo("Bar!" SPC %n); } package FooBarPackage { function Foo::DoStuff(%n) { echo("Packaged Foo!" SPC %n); parent::DoStuff(%n); } }; activatePackage(FooBarPackage); $FooBar.doStuff(); --- End code --- Results in this console output: --- Code: ---Packaged Foo! 7324 Foo! 7324 Bar! 7324 --- End code --- So it should work. |
| Navigation |
| Message Index |
| Previous page |