I am using the creation kit and all I see is how to get a global variable and then check for a condition to display it.
I don't want to write 100 conditions to anticipate every number the global variable is. I just want to display its current number
to give me an idea of what is going on with my script (troubleshooting).
How can I display the global variable's content, in this case an integer; without checking for every possible value it might be?
Edit / UPDATE:
I don't know all the ways, but I was successful using Debug.Notification.
GlobalVariable.psc already has the built in functions so no need to declare a function.
Look for the variable you want to display in the creation kit / under Miscellaneous / Global
For instance the value held in the GlobalVariableGV auto that will return the value of HasHireling.
1. Define a variable similar to the name of the global variable you want to display.
Example: GlobalVariable Property GlobalHasHirelingGV auto.
2. Declare a temporary variable that will get the value of your GlobalVariable.
Example: int HasHirelingValue=(GlobalHasHirelingGV.getValue() as int)
3. Display the temporary value in a debug statement so user can see the test in the game.
Example: Debug.notification (" Current Hireling Global : " + HasHirelingValue.GetValue() as int)
4. Compile
5. Declare the property GlobalVariable GlobalHasHirelingGV as "HasHireling"
6. Place the script on an activator, like a lever that has animation, Name the script that extends object reference conditional.
I did this for a duplicated Norlevl01 lever.
Edited by Ashenfire, 05 October 2015 - 11:16 AM.