Jump to content

Recommended Posts

Posted

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

Posted
  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 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

Posted

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.

Posted

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..

Posted
  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.

  • Recently Browsing   0 members

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