Spoiler
TargetCount = Utility.RandomInt(MinSkins, MaxSkins)HISJLE01QTotal.value = http://forums.bethsoft.com/topic/1441075-i-thought-globals-were-persistent/TargetCountfloat CurrentCount = Game.GetPlayer().GetItemCount(TargetSkins)HISJLE01QCount.Value = CurrentCountUpdateCurrentInstanceGlobal(HISJLE01QCount)UpdateCurrentInstanceGlobal(HISJLE01QTotal)
The way I've set up my export fetch quests are like this. When the player activates a static note, a message is displayed showing what the player needs to get and how many of for that contract. This is radiant and randomly generated. Through clever use of starting the quest but not actually starting the quest (starting, setting up the logic, but pausing on an empty stage so the quest isn't in your journal yet), this works like so : http://static.skyrim.nexusmods.com/mods/images/18866-1-1359741789.jpg
The player can only have 1 actual active export running at a time, so when they select a note it will always display what that contract requires, it just won't allow a new quest to "run" whilst another is running.
I forgot that all my export quests use the same global variables in their script; HISJLE01QCount (player object count) and HISJLE01QTotal (Total objects to get). As you can see from the above script, which runs when the quest starts to determine the counts, the global variable is actually set. Like, "Hey global, you're this number, deal with it!". However, if I have 2 notes on the wall for 2 different quests, each quest runs it's initial logic fine and displays a separate Total Amount to Get when activated.... If you understand what I mean, I don't get how that's possible...
Properties I get can be different values for each iteration of a reference, but I thought globals were static and persistent.
How can 1 global variable be 2 different values?????? Seriously, proper confused me it has lol.