Accessing a variable from an object script?

Post » Wed Aug 17, 2011 9:27 pm

How. I thought someone told me I could use OBSE's RunScriptLine function, but I looked at it in the docs and it doesn't seem right.
User avatar
Tom Flanagan
 
Posts: 3522
Joined: Sat Jul 21, 2007 1:51 am

Post » Wed Aug 17, 2011 6:50 pm

RunScriptLine works just fine with quest scripts because you can set the value of XXXXQuest.Variable to your own variable.
I don't see how you could get an object script value unless it's a global, or it is also a quest script var, or you use RunScriptLine in the object script itself to set your quest.var.
User avatar
Bad News Rogers
 
Posts: 3356
Joined: Fri Sep 08, 2006 8:37 am

Post » Wed Aug 17, 2011 6:51 pm

Like this:

if (JauffreRef.MQ04Voice == 1)

or

set Statue to (MartinRef.playerStatue)

or

set JauffreRef.MQ04Voice to 1

or

set AlvalUvaniRef.DrinkTimer to (AlvalUvaniRef.DrinkTimer + getSecondsPassed)


Like that. The object does need to be placed in the world and be persistent, however.
User avatar
Lyd
 
Posts: 3335
Joined: Sat Aug 26, 2006 2:56 pm


Return to IV - Oblivion