Page 3 of 6

Re: [ DEV ] InfinityScript Suggestions

Posted: Sun Feb 07, 2016 3:52 pm
by ~Lambder
Boboo wrote:
Lambder wrote:You know something I'd really like?
A working destructor for the scripts that gets called right before they are unloaded.

This way, we can do so much more stuff. Too bad it needs some kind of hooking and possibly changing the tekno source.


The destructor was working actually when I used it...

Code: Select all

~<Constructor> {...}


How many versions ago was that? lul.

Hm, lemme check on 3.11.

Re: [ DEV ] InfinityScript Suggestions

Posted: Sun Feb 07, 2016 5:52 pm
by ~Seraphim
It's quite easy to patch IS to do that.

Re: [ DEV ] InfinityScript Suggestions

Posted: Sun Feb 07, 2016 6:40 pm
by ~Lambder
Actually that works now. I guess printing to the console wasn't the best test to see if it worked or not >.> xD

Re: [ DEV ] InfinityScript Suggestions

Posted: Sun Feb 07, 2016 7:44 pm
by cubrr
Lambder wrote:You know something I'd really like?
A working destructor for the scripts that gets called right before they are unloaded.

In the upcoming Tekno release, the BaseScript class has a new method named OnScriptUnload which gets called...when the script is unloaded.

Re: [ DEV ] InfinityScript Suggestions

Posted: Sun Feb 07, 2016 8:05 pm
by ~Seraphim
One thing I have noticed however is that IS uses some methods that MW3 doesn't actually have.

Re: [ DEV ] InfinityScript Suggestions

Posted: Sun Feb 07, 2016 8:07 pm
by cubrr
c4271605 wrote:One thing I have noticed however is that IS uses some methods that MW3 doesn't actually have.

And these are?

Re: [ DEV ] InfinityScript Suggestions

Posted: Sun Feb 07, 2016 8:43 pm
by ~Lambder
cubrr wrote:
Lambder wrote:You know something I'd really like?
A working destructor for the scripts that gets called right before they are unloaded.

In the upcoming Tekno release, the BaseScript class has a new method named OnScriptUnload which gets called...when the script is unloaded.


We don't really need that when we have a working destructor, mate.

Re: [ DEV ] InfinityScript Suggestions

Posted: Sun Feb 07, 2016 9:23 pm
by cubrr
Lambder wrote:
cubrr wrote:
Lambder wrote:You know something I'd really like?
A working destructor for the scripts that gets called right before they are unloaded.

In the upcoming Tekno release, the BaseScript class has a new method named OnScriptUnload which gets called...when the script is unloaded.


We don't really need that when we have a working destructor, mate.

The finalizer only gets called when the garbage collector calls it. That can be literally at any arbitrary time after the object is deemed to be valid for collection. OnScriptUnload gets called exactly when the script is being unloaded.

Re: [ DEV ] InfinityScript Suggestions

Posted: Sun Feb 07, 2016 9:44 pm
by ~Lambder
cubrr wrote:
Lambder wrote:
cubrr wrote:
Lambder wrote:You know something I'd really like?
A working destructor for the scripts that gets called right before they are unloaded.

In the upcoming Tekno release, the BaseScript class has a new method named OnScriptUnload which gets called...when the script is unloaded.


We don't really need that when we have a working destructor, mate.

The finalizer only gets called when the garbage collector calls it. That can be literally at any arbitrary time after the object is deemed to be valid for collection. OnScriptUnload gets called exactly when the script is being unloaded.


Well, I'm pretty sure the destructor won't be called before the OnUnload function anyways.
Nothing to change here.

Re: [ DEV ] InfinityScript Suggestions

Posted: Sun Feb 07, 2016 10:12 pm
by Boboo
Lambder wrote:Actually that works now. I guess printing to the console wasn't the best test to see if it worked or not >.> xD


Look at this scrub... :-P