Jump to content

Of course button scripts don't save values


nenina

Recommended Posts

Hello! I am trying to do something I've never done before which means I do things just to see if they work.

 

So I have this perk which adds option buttons when activating an actor and runs an instant script:

Memorize Hair

Apply Memorized Hair

 

Memorize Hair button - tries to memorize the npc I use this button on

Ref VBSelfSource
Set VBSelfSource to GetSelf

Apply Memorized Hair button - tries to call up previously "memorized" actor and apply their hair to another actor that I use this button on

Ref VBSelfSource
Ref VBSelfRecipient
Set VBSelfRecipient to Getself
VBSelfRecipient.CopyHairFrom VBSelfSource

And of course this doesn't work because those are separate instances of script. But my mind said "what if it does?!" Is there a way for me to copy these actors the same way as GetSelf does and store that somewhere else to be accessed and called up again? I think I did something like that once, one time, but it was long ago. This new command, CopyHairFrom, is from FOSE Extended.

Edited by nenina
Link to comment
Share on other sites

You can create the equivalent of a global variable with a quest script. Then the other scripts that fire from the button (whatever that is) access the quest script variable.

 

Quest script for quest MyQuestA

scn MyQuestAScript

ref VBSelfSource

Then to set it:

Set MyQuestA.VBSelfSource to GetSelf

etc.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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