RadiantRoma Posted September 8, 2016 Share Posted September 8, 2016 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! Link to comment 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 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 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 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 Share on other sites More sharing options...
Recommended Posts
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.