eZeth Posted October 5 Share Posted October 5 Hi all, I'm trying to do as below local _G = GLOBAL local require = _G.require print("============= loaded mod") AddClassPostConstruct("screens/multiplayermainscreen", function(MultiplayerMainScreen) print("====================== multiplayermainscreen") print(MultiplayerMainScreen) local oldOnModsButton = MultiplayerMainScreen.OnModsButton MultiplayerMainScreen.OnModsButton = function(MultiplayerMainScreen) print("====================== Clicked on mods button") oldOnModsButton(MultiplayerMainScreen) end end) However, I can only see "=========== loaded mod" printed and not the others. I'm sure I've got it right in adding new functionality or replacing the function. But I don't understand how this does not work. Is this the old way of doing things? Link to comment Share on other sites More sharing options...
Rickzzs Posted October 5 Share Posted October 5 screens/redux/ Link to comment Share on other sites More sharing options...
eZeth Posted October 5 Author Share Posted October 5 I too found out about screens/redux/ a few hours ago after scourging through the workshop for a mod that does this. So to those who are still unclear, your code should look like this, AddClassPostConstruct("screens/redux/multiplayermainscreen", Your_Function) Link to comment 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