Page 1 of 1

Global Vars handling?

Posted: Sat Nov 30, 2024 7:44 pm
by Letho
Hi,

I started playing Daggerfall last month, first elder scrolls game although I was supposed to play Morrowind, but I
happened on a folder of mine with a older version of DFU that I never played while setting it up so I decided to start there instead.
And I fell in love with Daggerfall so I guess Morrowind will keep waiting a while yet.

Anyhow, not here to bore you with my story in this game, simply saying thank you and more to Interkarma and everyone
who helped him with DFU. I have a idea of what this kind of project demand in time and effort investments.

I peeked into the quest files while playing my first playthrough and well, decided to give a crack at modding afterward. It's starting to go rather well after learning and experimenting but I still wonder if the global variables in this game are,
well, global variables like in any other games I have seen.

So my main question, do the global vars actually register somewhere in the engine outside of the quest system when set?
For instance, to be clear, one of my scripts does this:

Code: Select all

Unused12 _PCisInHammerfell_

Unused13 _PCisInHighRock_

_InHighRock_ task:
when _PCisInHighRock_
start timer _FoeHR_

_InHammerfell_ task:
when _PCisInHammerfell_
start timer _FoeHMF_
The two global vars are checked and set in another quest, which is run just before this one begin, and yet the timers
above are never started once it's their quest's turn to run, unless the previous quest that check the pc location is run again.
Now that's fine in this case, just a side quest that can afford to run the other quest again, but I have other global vars on
which I plan to rely on to check states between quests.

So my question, shouldn't I end quests when they set a global var and that I want them to keep tracks of various states?

I hope it wasn't confusing. And since I asked that, can DFU engine run, I don't know, 20 or more quests that never end without issue?

Re: Global Vars handling?

Posted: Mon Dec 02, 2024 5:04 pm
by Letho
Answering to myself, yes global variables are global vars and don't need to be set in a never ending quest script to work
in others. It was my mistake, a forgotten trigger from a test was confusing my global vars above, sorry about the mix up.