Jump to content

Script help needed - Leg crippling.


ObLars

Recommended Posts

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

Link to comment
Share on other sites

create variables for the limb values

 

on equip, set the variables to the limb values and cripple the legs

on 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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...