Jump to content

Problem with quest variable reference


Riain

Recommended Posts

You are meant to call it on the questID (which for you is 0Test2 not 0Test1). The name of the quest is just the name that appears in the game.

 

So the correct script function is

 

Set 0Test2.TestVar to 2.

 

On that note your scripts won't work very well either. You have two gamemode scritps, one running on a quest, one running on an object that are both continually setting the variable to 1 and 2 respectively. The quest gamemode block will run every five seconds while the object script will run every frame, meaning that as soon as the object script starts running you will continually have the variable set to 2.

 

You need to seperate them with other variables to both prevent them from running continually and at the same time. E.g First script

 

Scriptname FirstScript

short testvar
short doonce

begin gamemode

if doonce == 0
  set testvar to 1
  set doonce to 1
endif

end

 

Second script

 

Scriptname SecondScript

short doonce

begin gamemode

if doonce == 0
  if 0Test2.testvar == 1
  set 0Test2.testvar to 2
  set doonce to 1
  endif
endif

end

 

You can also put a message in there telling you the variables have been changed to be sure. I would do that for you but I'm still not too sure how Fallout 3 handles messages yet. I also agree with thc1234 not to name your quests starting with a number, it causes screw ups.

Link to comment
Share on other sites

  • 4 years later...
  • Recently Browsing   0 members

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