Bount227 Posted April 5, 2024 Posted April 5, 2024 I can't compare a Global to a global, I can't compare a Global to an "int", I can't make "int" = Global. What is the point of it? Literally using it as a reliable way to track a script progress throughout multiple stages and it's useless. 1
worm82075 Posted April 6, 2024 Posted April 6, 2024 The point of a global variable is so that ANY script can access and/or alter the variable. If only 1 script is doing so then it doesn't need to be a global variable. Why are you trying to track stages with a global anyway when all registered quest stages act like a global variable in that ANY script can access and/or alter them. Just like globals the game engine keeps track of them by default.
Bount227 Posted April 6, 2024 Author Posted April 6, 2024 12 hours ago, worm82075 said: The point of a global variable is so that ANY script can access and/or alter the variable. If only 1 script is doing so then it doesn't need to be a global variable. Why are you trying to track stages with a global anyway when all registered quest stages act like a global variable in that ANY script can access and/or alter them. Just like globals the game engine keeps track of them by default. It's multiple variables that need to be tracked, not just 1. But I figured out a compromise without variables, just felt it was ridiculous that I couldn't use it the way I needed it to as my compromise might not even work all the way
DlinnyLag Posted April 7, 2024 Posted April 7, 2024 15 hours ago, Bount227 said: just felt it was ridiculous that I couldn't use it the way I needed it Just ignore your feel. You have a fact of global variables existence in their form. Nobody will change it. Accept it, and use or don't use them. 15 hours ago, Bount227 said: It's multiple variables that need to be tracked, not just 1. Perhaps, F4DS might help you.
SKKmods Posted April 7, 2024 Posted April 7, 2024 > I can't compare a Global to a global Yes you can: if(myGlobalVariableA.GetValue() == myGlobalVariableB.GetValue()) > I can't compare a Global to an "int" Yes you can: if(myGlobalVariableA.GetValue() as Int == IntVariable) OR if(myGlobalVariableA.GetValue() == (IntVariable as Float)) Although if your Global actually does contain a decimal you may want to use the Math.Ceiling() or Math.Floor() Int conversions. > I can't make "int" = Global. Yes you can: myGlobalVariableA.SetValue(IntVariable as Float) 1
LarannKiar Posted April 7, 2024 Posted April 7, 2024 Globals are utilized by a few forms such as Quests (see Quest Completion XP, Text Display Globals, UpdateCurrentInstanceGlobal) and Messages (Text Replacements) so sometimes they can't be avoided.
Recommended Posts