Difference between revisions of "Debug Scripts"
Jump to navigation
Jump to search
no edit summary
imported>AdiBeiElderScrolls |
imported>AdiBeiElderScrolls |
||
Line 10: | Line 10: | ||
Object scripts may run every frame, but they also may not execute for quite a while, if player is not near. Even there are cases, where AI packages prevent script running. This is true for Follow-Packages if they check on conditions related to script variables in the same object. | Object scripts may run every frame, but they also may not execute for quite a while, if player is not near. Even there are cases, where AI packages prevent script running. This is true for Follow-Packages if they check on conditions related to script variables in the same object. | ||
To find out, if your script is executed, simply put a code | To find out, if your script is executed, simply put a code like the following into your script and control it afterwards ingame | ||
<pre>; use long, if you want to watch the frames | <pre>; use long, if you want to watch the frames | ||
Line 48: | Line 48: | ||
'''Take care''', if you use [[Message]] or [[MessageBox]] functions inside of your script! | '''Take care''', if you use [[Message]] or [[MessageBox]] functions inside of your script! | ||
The delay of the [[Message]] function will cause, that the displayed values are not the current ones. Moreover, the first time every message is executed in the script, it will be delayed. Every further execution (next frame) leads to messages running at the top of screen to fast to follow. To make sure, that you can watch all messages for every frame, use | The delay of the [[Message]] function will cause, that the displayed values are not the current ones. Moreover, the first time every message is executed in the script, it will be delayed. Every further execution (next frame) leads to messages running at the top of screen to fast to follow. To make sure, that you can watch all messages for every frame, use some dialog function like [[ShowEnchantment]] at the end of the code block to examine. | ||
But always keep in mind, that the values shown in the message, are '''NOT''' the current values. | But always keep in mind, that the values shown in the message, are '''NOT''' the current values. |