Jump to content

Overriding a local function (Component)


Rtd

Recommended Posts

Hi!

 

Please don't hit me! xD

I know that is a recurrent problem : I've searched a lot on the subject in the forum and didn't find any answer that is 'valid' and 'understandable' for my little knowledge on Lua and DS scripting...

 

So, for what I'm at actually :

I'm able to override 'properly' (in the API way) components functions, etc...

I'm having a lot a fun with them but I ran into a wall because one, ONE (xD), little function of my mod is an override of a Local function in a component.

The component in question is the Perishable component, and more precisely its Update(inst, dt) function.

 

I'm stuck.

Please help xD

 

How to override this, please? :indecisiveness:

 

Thank you very much in advance!

 

PS: I know that it isn't 'possible' in theory! But that's really the only last thing that prevent my mod to work... :wilson_cry:

Link to comment
Share on other sites

Thank you for your reply _Q_!

 

I've 'heard' about this method, but...

Oh. I see now!

Since this is a local function there can't be any call from outside...I'm stupid. xD

I was afraid that there could be other scripts that would call this function (ie. the game itself).

 

Thank you again! :grin:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...