How to reference a variable from another script?

Post » Sat Feb 20, 2010 1:03 pm

I know how to reference a variable from a quest script. But what about from another script that is not part of a quest?

For a quest it's..

MyQuest.myVariable or

set MyQuest.myVariable to 1

But what about if the script isn't attached to a quest?
User avatar
Unstoppable Judge
 
Posts: 3337
Joined: Sat Jul 29, 2006 11:22 pm

Post » Sat Feb 20, 2010 5:42 am

Same thing, but it has to be on a persistent reference. myPerRef.myVariable.

edit: At least, I think that's how it's done. I think it's more common to have that item copy it's variables to a quest script that any other script can access.
User avatar
Verity Hurding
 
Posts: 3455
Joined: Sat Jul 22, 2006 1:29 pm

Post » Sat Feb 20, 2010 9:30 am

Showler's correct.
User avatar
Alexandra Ryan
 
Posts: 3438
Joined: Mon Jul 31, 2006 9:01 am


Return to IV - Oblivion