Rtd Posted October 26, 2014 Share Posted October 26, 2014 Hi! Please don't hit me! xDI 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? 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... Link to comment https://forums.kleientertainment.com/forums/topic/42898-overriding-a-local-function-component/ Share on other sites More sharing options...
_Q_ Posted October 26, 2014 Share Posted October 26, 2014 Just make your local function and replace all calls in the whole componet to your function. Link to comment https://forums.kleientertainment.com/forums/topic/42898-overriding-a-local-function-component/#findComment-557620 Share on other sites More sharing options...
Rtd Posted October 26, 2014 Author Share Posted October 26, 2014 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. xDI was afraid that there could be other scripts that would call this function (ie. the game itself). Thank you again! Link to comment https://forums.kleientertainment.com/forums/topic/42898-overriding-a-local-function-component/#findComment-557623 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now