Maris Posted February 27, 2015 Share Posted February 27, 2015 (edited) What is the best way for those mods to be compatible with each other? Is there any addendum function which can be hooked? I found only components.locomotor.bonusspeed variable, but it's just variable, and each mod will overwrite it. Edited February 27, 2015 by Maris Link to comment Share on other sites More sharing options...
Developer bizziboi Posted February 27, 2015 Developer Share Posted February 27, 2015 ...it could add to the bonusspeed when enabling itself and subtract when disabling? Link to comment Share on other sites More sharing options...
DarkXero Posted February 27, 2015 Share Posted February 27, 2015 local key = "My unique key"local function AddMyMultiplier(inst) inst.components.locomotor:SetExternalSpeedMultiplier(inst, key, 1.5)endlocal function RemoveMyMultiplier(inst) inst.components.locomotor:RemoveExternalSpeedMultiplier(inst, key)endThat way you don't need to touch what others change, or other multipliers.And you can add many multipliers too! Link to comment Share on other sites More sharing options...
Developer bizziboi Posted February 27, 2015 Developer Share Posted February 27, 2015 Ah, there was a mechanism in place. I shoulda checked the code - I assumed there wasn't based on the question. Link to comment Share on other sites More sharing options...
DarkXero Posted February 27, 2015 Share Posted February 27, 2015 Ah, there was a mechanism in place. I shoulda checked the code - I assumed there wasn't based on the question. Still, you can pretty much edit everything in locomotor and obtain speed boosts. Link to comment Share on other sites More sharing options...
rezecib Posted February 27, 2015 Share Posted February 27, 2015 Yeah, the mechanism was added very recently so I would be surprised if there were a bunch of mods out there still just editing runspeed and walkspeed. Link to comment Share on other sites More sharing options...
Maris Posted June 6, 2015 Author Share Posted June 6, 2015 (edited) ...it could add to the bonusspeed when enabling itself and subtract when disabling?Now bonusspeed variable is deleted from code. Edited June 6, 2015 by Maris Link to comment Share on other sites More sharing options...
Kzisor Posted June 6, 2015 Share Posted June 6, 2015 @Maris, @DarkXero, posted the proper method of adjusting speed in the locomotor component. I imagine the bonusspeed variable was deleted because it was a duplicate variable with the other functionality. 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