Riain Posted January 28, 2009 Posted January 28, 2009 I know that scripts can use the variables in a quest's script by referencing it like so: set questid.variable to 1 I can do this with quest that are already made, but for some reason when I created a quest and a related script and then referenced one of the quest variables in another script GECK complained that the variable doesn't exist. I tested it out with a few other quest not made by me and no compaint... So is there anything I am doing wrong? The quest is set to be enabled at the beginning of the game. I am refencing the quest's id not the script name... It is working for other quest so... :wallbash:
Lingwei Posted January 30, 2009 Posted January 30, 2009 Have you attached the script to the quest, and is it a quest script, and are you sure you are writing the variable properly in both the script (e.g short doonce) and aren't making any spelling mistake? All I can think of.
Riain Posted January 30, 2009 Author Posted January 30, 2009 I am pretty sure I checked all of those more than once. I will check them again. I'll slap myself if it is one of those mistakes.
SpeedyB64 Posted January 30, 2009 Posted January 30, 2009 Have you closed the quest window? The quest is not created until you have set it all up and closed the window. I used this a lot in my mod so it should be working.
Riain Posted January 30, 2009 Author Posted January 30, 2009 I am not at my computer s I can't check, maybe I shouldn't comment on this until I am. But I am pretty sure that when refering to the variable I copy and pasted all the names to make sure I didn't misspell them. I also check to make sure that the quest did have that script. For speedy's suggestion, I even restarted GECK to make sure that it need to load the quest first before using variables (which would be silly). So I think I closed the window... maybe I reopened it again after I opened GECK. I will try when I get back home. Thanks guys. :)
Riain Posted January 30, 2009 Author Posted January 30, 2009 Okay, let's make sure I am not being really stupid here is what I have: QuestQuest Name: 0Test1Quest Id: 0Test2Priority: 50Quest Script: 0TestQuestStart Game Enabled The Quest Script:Type: Quest scn 0TestQuestshort TestVarBegin GameModeset TestVar to 1End The Script Accessing the Variable:Type: Object scn 0TestVarScriptBegin GameModeset 0Test2.TestVar to 2End I have made sure that both the quest window and the quest script are closed. GECK says 'Unknown variable 0Test1.TestVar'. So... what am I doing wrong here?
Riain Posted February 4, 2009 Author Posted February 4, 2009 So is there something I am missing? Am I supposed to do anything more then what I stated above... cause it still doesn't work. :(
thc1234 Posted February 4, 2009 Posted February 4, 2009 try not using number as first character in your quest name
SpeedyB64 Posted February 5, 2009 Posted February 5, 2009 Thats very odd :confused: It looks good to me. Very strange I have no idea why it would not work. Try using all letters and maybe change the testVarscript to begin onactivate :confused: ? This technique worked great for me so it must be something.
Recommended Posts