ObLars Posted November 30, 2010 Posted November 30, 2010 Hi. Im working on a little something something, and i can't figure how to write a script to accomplish this. The idea is too setactorvalue to 0 when a specific item is worn, but set actor value back to what it was before the item got equipped. So; If legs has a condition of 25% when not equipped, then you wear the piece of armour, you get 0% mobility. Then when you unequipp it you regain the 25% condition. How could this be done? Is the engine compatible to save actor values? I dont know if im clear on what i mean. Help is appriciated. Setactorvalue LeftMobilityCondition 0 Setactorvalue RightMobilityCondition 0
Quetzlsacatanango Posted November 30, 2010 Posted November 30, 2010 create variables for the limb values on equip, set the variables to the limb values and cripple the legson unequip, set the limb values to the variables
ObLars Posted November 30, 2010 Author Posted November 30, 2010 On 11/30/2010 at 8:07 PM, Quetzlsacatanango said: create variables for the limb values on equip, set the variables to the limb values and cripple the legson unequip, set the limb values to the variables I guess. So there is actually a way to do something like that? Im quite new to making complex scripts, could you possibly throw me a hint? :P
Quetzlsacatanango Posted November 30, 2010 Posted November 30, 2010 I don't really have time to try it out but it will look something like scn myscriptname short leftleg ;stores left leg health short rightleg ;stores right leg health Begin OnEquip player ; assuming this is for the player... a little more voodoo for anyone set leftleg to player.getav leftmobilitycondition set rightleg to player.getav rightmoibilitycondition player.setav leftmobilitycondition 0 player.setav rightmobilitycondition End Begin OnUnequip player player.setav leftmobilitycondition leftleg player.setav rightmobilitycondition rightleg End Something like that. Hopefully you can get the idea.
ObLars Posted November 30, 2010 Author Posted November 30, 2010 Hugely appriciated. Although i get a warning on this line, somehow; set rightleg to player.GetActorValue rightmoibilitycondition Says there is no value. Allthough if i paste 0 as a value infront of it, the warning still stands..
Quetzlsacatanango Posted November 30, 2010 Posted November 30, 2010 Maybe cuz I spelled it wrong :)moibility
ObLars Posted November 30, 2010 Author Posted November 30, 2010 On 11/30/2010 at 9:17 PM, Quetzlsacatanango said: Maybe cuz I spelled it wrong :)moibility Hehe *blush* Im quite new at spotting, like everything else. Thanks a BUNCH! Worked out great. Love.
Recommended Posts