Jump to content

Scripting question -- using a variable from another quest


kryptopyr

Recommended Posts

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

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 anyway

edit: compiler errors help a lot.

Link to comment
Share on other sites

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 by kryptopyr
Link to comment
Share on other sites

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.

opps

Int RiftenStage = pRiftenCityQuest.getstage() as int

should go inside the event

Link to comment
Share on other sites

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 by kryptopyr
Link to comment
Share on other sites

  • Recently Browsing   0 members

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