kryptopyr Posted April 28, 2012 Share Posted April 28, 2012 Can anyone tell me how I can use a variable from one quest in script from another quest? I just want the script to check the variable in the HousePurchase quest to see which houses the player owns. Link to comment Share on other sites More sharing options...
scrivener07 Posted April 28, 2012 Share Posted April 28, 2012 Read - Getting Properties of a Quest Script Link to comment Share on other sites More sharing options...
kryptopyr Posted April 28, 2012 Author Share Posted April 28, 2012 Thank you. However, I've already read through it, and I guess I'm still doing something wrong. Here's what I have: Quest Property pRiftenCityQuest Auto ObjectReference Property pRiftenMarker HousePurchaseScript Property HousePurchase Auto Event OnRead() if HousePurchase.RiftenHouseVar == 1 && pRiftenCityQuest.getstage() >= 200 pRiftenMarker.Enable() endif ;I repeat the lines above for each of the cities/houses EndEvent I've defined the properties. And the script works great if I take out the HousePurchase.RiftenHouseVar == 1, so I'm pretty sure that it's the issue. Any suggestions? Link to comment Share on other sites More sharing options...
scrivener07 Posted April 28, 2012 Share Posted April 28, 2012 Quest Property pRiftenCityQuest Auto ObjectReference Property pRiftenMarker HousePurchaseScript Property HousePurchase Auto Int RiftenStage = pRiftenCityQuest.getstage() as int Event OnRead() if (HousePurchase.RiftenHouseVar == 1) If (RiftenStage >= 200) pRiftenMarker.Enable() Else ;post your compiler errors because I suck at papyrus Endif endif ;I repeat the lines above for each of the cities/houses EndEvent lol, im tired. I didnt test it but I hope it helps anywayedit: compiler errors help a lot. Link to comment Share on other sites More sharing options...
kryptopyr Posted April 28, 2012 Author Share Posted April 28, 2012 (edited) Thanks a lot. I'll go try it out right now and let you know. My original script compiled successfully... I didn't get any errors; it just didn't work in game. Edit: Nope, it didn't compile. The errors were:no viable alternative at input 'pRiftenCityQuest'required (...)+ loop did not match anything at input '.'unknown user flag pRiftenCityQuest Thanks anyway. I'll keep trying. Edited April 28, 2012 by kryptopyr Link to comment Share on other sites More sharing options...
scrivener07 Posted April 28, 2012 Share Posted April 28, 2012 Thanks a lot. I'll go try it out right now and let you know. My original script compiled successfully... I didn't get any errors; it just didn't work in game. Edit: Nope, it didn't compile. The errors were:no viable alternative at input 'pRiftenCityQuest'required (...)+ loop did not match anything at input '.'unknown user flag pRiftenCityQuest Thanks anyway. I'll keep trying.oppsInt RiftenStage = pRiftenCityQuest.getstage() as intshould go inside the event Link to comment Share on other sites More sharing options...
kryptopyr Posted April 29, 2012 Author Share Posted April 29, 2012 (edited) I tried the script several more times but just couldn't get it to work with the HousePurchase variable. Maybe what I'm asking for is a variable that isn't available to be used outside of it's original script. I'm really new to scripting, and I'm not sure I'm clear on how you tell the difference between a private variable and a property that can be used by other scripts. However, I was able to find an alternative to accomplish what I needed. I used GetFactionOwner on the cells in question to return whether or not the house was owned by the player. Worked like a charm! Here's the result: http://skyrim.nexusmods.com/downloads/file.php?id=16134 Thanks for your help! Edited April 29, 2012 by kryptopyr Link to comment Share on other sites More sharing options...
Recommended Posts