RadiantRoma Posted September 8, 2016 Share Posted September 8, 2016 (edited) I am making a custom character who would be persuaded to use grass armor by having other armors slow her down (just like marble armor). In the Marble Armor's prefab file I found this like of code inst.components.equippable.walkspeedmult = TUNING.ARMORMARBLE_SLOW so is there a way I could make every armor except for grass armor slow her down just like marble armor would? thanks! Edited September 8, 2016 by Romanful inserting code Link to comment https://forums.kleientertainment.com/forums/topic/70040-help-with-a-custom-character-armor-settings/ Share on other sites More sharing options...
Mobbstar Posted September 9, 2016 Share Posted September 9, 2016 AddPrefabPostInt("armorwood", function(inst) inst.components.equippable.walkspeedmult = TUNING.ARMORMARBLE_SLOW end) Replace "armorwood" with others to apply to other armor types (including hat and held). You can find the code-name for every item in data/strings.lua Link to comment https://forums.kleientertainment.com/forums/topic/70040-help-with-a-custom-character-armor-settings/#findComment-811794 Share on other sites More sharing options...
RadiantRoma Posted September 10, 2016 Author Share Posted September 10, 2016 On 9/9/2016 at 2:07 AM, Mobbstar said: AddPrefabPostInt("armorwood", function(inst) inst.components.equippable.walkspeedmult = TUNING.ARMORMARBLE_SLOW end) Replace "armorwood" with others to apply to other armor types (including hat and held). You can find the code-name for every item in data/strings.lua thank you! would I put this in modmain.lua or in the scripts/prefabs file for the character? Link to comment https://forums.kleientertainment.com/forums/topic/70040-help-with-a-custom-character-armor-settings/#findComment-812364 Share on other sites More sharing options...
Zeklo Posted September 12, 2016 Share Posted September 12, 2016 On 9/8/2016 at 10:07 PM, Mobbstar said: AddPrefabPostInt("armorwood", function(inst) inst.components.equippable.walkspeedmult = TUNING.ARMORMARBLE_SLOW end) Replace "armorwood" with others to apply to other armor types (including hat and held). You can find the code-name for every item in data/strings.lua Wouldn't it be AddPrefabPostInit And wouldn't this apply to everyone, and not just their character? Link to comment https://forums.kleientertainment.com/forums/topic/70040-help-with-a-custom-character-armor-settings/#findComment-812752 Share on other sites More sharing options...
DwerBomb Posted September 17, 2016 Share Posted September 17, 2016 Excuse me Mobb but wouldn't that require a listen to "onequip" event too? Link to comment https://forums.kleientertainment.com/forums/topic/70040-help-with-a-custom-character-armor-settings/#findComment-815015 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