Jump to content

Can local variables from an Object Script can be accessed like Quest Variables?


Recommended Posts

I recently found something interesting in the "Nehrim.esm" which is the master for the total conversion Nehrim - At Fate's Edge.

 

And I am not sure if this is actually a thing or just some weird stuff.

Set DoorReferenceID.HebelBetaetigt to 1

So... "DoorReferenceID" is the reference name of a door placed in the world space and "HebelBetaetigt" is a local variable in that door script.

It's accessed here from another object script (the script of the lever / Hebel actually).

 

I know that quest variables can be accessed by this syntax

Questname.VarName

but I never heard about this Object Script thing.

 

Yet it appears it seemed to work - functionality wise - in the game.

 

But I wonder if this were able to cause instabilities. I've changed "HebelBetaetigt" to a quest variable now and also changed all instances where "HebelBetaetigt" is used to point to the actual quest variable and not to the one in the Object Script of the door.

 

 

Still not sure if this was actually necessary?!

 

Does anyone know if this is actually a save thing to do, accessing variables of Object Scripts in that way?

 

Cheers

Link to comment
Share on other sites

I do it all the time, changing variables from one script to the other, no matter if it is quests or objects. I mostly do it with my spell scripts really.

 

Like this one:

Scn PekAddItemsToSortingDatabaseSPLSCR

Begin ScriptEffectFinish

	Set PekChestSortingQUST.State to 2

	Dispel PekAddItemsToSortingDatabaseSPL
End

Link to comment
Share on other sites

"PekChestSortingQUST", but this looks like a questID with that "QUST"-tag. ^^

Is "State" really a local variable from an object script which you are changing here or is it a quest variable?

 

I know quest variables are like "hidden" global variables as they can get accessed at any point with the proper syntax.

 

But there is nowhere a documentation to be found about local variables from object scripts being accessed via "ReferenceID.VarName", so I was wondering. ;)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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