Jump to content

[LE] Saving a value with papyrus compiler


hernans

Recommended Posts

Hi guys, im actually modding https://www.nexusmods.com/skyrim/mods/12185/?tab=posts&BH=1 , i want to relase it if the mod developer agrees, but im in some trouble. This is a werewolf mod, that when you feed, increases the scale of the werewolf, i added that health and damage gain per feed too. But my problem its that the scale reverts when human form. So i want to create a float, that remembers the value of werewolf scale, without having to check the current scale. Sorry for the bad english and i appreciate the help.

Link to comment
Share on other sites

Just brainstorming - fairly new to scripting - but could you create a global variable in the CK, and when your script changes the scale, it saves that change to the global? Then, when you go back to human the scale reverts but doesn't save to global. And when becoming a werewolf the initialization script reads the global to change initial scale.

 

EDIT: Looking at the script now, you probably wouldn't need to create a global. Just create a float as a local variable. Something like "float tempWereScale=1". Then, in the PrepShift function, after "WerewolfChange.Apply()", you would add in game.getplayer().setscale(tempWereScale) so that it increased your player scale to whatever value was there. Finally, in the Feed function, when setting your new size from feeding, add a line like, "tempWereScale=playerscale" to keep the value.

Edited by asterlacnala
Link to comment
Share on other sites

  • Recently Browsing   0 members

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