Objective: Debug Messages for Mod Testing (With OBSE and Without OBSE)
The purpose of this is to find out variables stated in the script, so you know it is running and to see what the outcome is. In the example script, I can figure out what the variables equal easily, but if you replace Variable01 with something that can be dynamic in-game, than this becomes helpful to know the outcome of the script variables. This can also be used to see if the script is even running. [Note: The two version are no different, except one message to the console and the other messages in-game.]
Options:
A. Without OBSE
B. With OBSE
Steps
Without OBSE:
A. 1. Edit a script:
Click on the pencil button, click on the folder button, and choose the script you want to edit.
Copy/type this code in the editor.
Scriptname DebugExampleScriptWithoutOBSEShort Variable01Short Variable02Short Variable03Begin GameModeSet Variable01 to 20Set Variable02 to (Variable01 * 2)Set Variable03 to ((Variable02 * 5) + Variable01)Message "Variable 1 is %.2f. Variable 2 is %.2f. Variable 3 is %.2f.", Variable01, Variable02, Variable03EndA. 2. Implement the edited script so it will run during the game.
Close the window and save the mod.
With OBSE:
B. 1. Edit a script:
Click on the pencil button, click on the folder button, and choose the script you want to edit.
Copy/type this code in the editor.
Scriptname DebugExampleScriptWithOBSEShort Variable01Short Variable02Short Variable03Begin GameModeSet Variable01 to 20Set Variable02 to (Variable01 * 2)Set Variable03 to ((Variable02 * 5) + Variable01)PrintToConsole "Variable 1 is %.2f. Variable 2 is %.2f. Variable 3 is %.2f.", Variable01, Variable02, Variable03EndB. 2. Implement the edited script so it will run during the game.
Close the window and save the mod.
With either version next time you play, you'll get a message (in the console or on screen) telling you the variables you specified in the script.