mdavey1994 Posted May 20, 2017 Share Posted May 20, 2017 Hi there! Very recently started modding however in the past week I have managed to create a fully custom standalone gun and melee weapon with optional mods ect. These have all been done at a proof of concept level and as such are not very pretty. This is mainly to let me know of my limits before I start making assets. As I have already got stuff workin in game and figured quite a bit out for myself I shouldnt need too much hand holding. My question is how can I create a condition that restricts a weapon being equipped? For example in case this is not clear, here is some psudocode: [Without power armour equipped] Upon bringing up the pip boy and navigating to the weapons tab, clicking on the Power Armour only weapon will display a prompt stating that "This weapon is too heavy to lift without power armour!" [Equipping with power armour] Upon bringing up the pip boy and navigating to the weapons tab, clicking on the Power Armour only weapon will equip the weapon allowing for regular use. ------- I have found the PowerArmourPerk that activates when the player gets in however I do not know how to apply this condition upon the player requesting to equip a weapon. Thank you for any and all help :) - MD Link to comment Share on other sites More sharing options...
shavkacagarikia Posted May 21, 2017 Share Posted May 21, 2017 (edited) Hmm, I'll suggest following script: Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference) If (akBaseObject == myweapon && !(game.getplayer().isInPowerArmor())) Game.getplayer().unequipitem(myweapon) Debug.notification("This weapon is too heavy to lift without power armour!") EndifEndevent Where myweapon is your needed weapon property. I can't test this, but I am pretty sure it will work. You will need to attach this script on player alias. Edited May 21, 2017 by shavkacagarikia Link to comment Share on other sites More sharing options...
Recommended Posts