Can you make Global References?

Post » Fri Nov 18, 2011 9:34 pm

Scripting question: is there a way to make a global reference? I'm using GetSelf to aquire the target but only modifying the reference after conditions are met in a quest. The idea is a weapon that hits the target but only activates when the player's health drops below a certain point. I know it sounds weird but has anyone got any tips?
User avatar
nath
 
Posts: 3463
Joined: Mon Jan 22, 2007 5:34 am

Post » Fri Nov 18, 2011 6:02 am

Well, if you have a quest script, it can store a ref and other scripts can reference it via QuestName.RefVar. The quest / quest script wouldn't even need to do anything; it could just be there to have the ref variable. Note that it's QuestName.RefVar, not QuestScriptName.RefVar (it'll get the RefVar from the quest's associated script).

Queue
User avatar
Devils Cheek
 
Posts: 3561
Joined: Sun Aug 13, 2006 10:24 pm


Return to Fallout: New Vegas