Can this be done-Debuging Timer and Turnscripts
Talon
01 Oct 2018, 02:57I'm thinking on how to troubleshoot various errors, and when you have a dozen timers and turnscripts sometimes you just want to easily disable them all rather than going through the laborious process of unchecking..and rechecking them all in the editor
The logic I'd initially use is having a script that goes through the whole game looking for the attribute turnscript in an object and then disabling the enabled attribute...
Though As i look through the code turnscripts don't seem to be objects as such... so im kinda wondering if this is even possible?
Would I have to manually go through all the timers and add them one by one to a script disabletimer (whatever)?
hegemonkhan
01 Oct 2018, 07:02you actually can for Turnscripts (Turnscripts are internal OBJECTS, which are most of the user-level 'Elements' of Quest):
http://docs.textadventures.co.uk/quest/functions/allturnscripts.html
http://docs.textadventures.co.uk/quest/elements/turnscript.html
http://docs.textadventures.co.uk/quest/elements/
<game name="example">
<attr name="start" type="script">
foreach (turnscript_variable, AllTurnScripts ()) {
turnscript_variable.enabled = false
}
</attr>
</game>
not sure about Timers though...
The Pixie
01 Oct 2018, 07:24What HK said. For timers I think you would have to do it manually as you say.
Talon
03 Oct 2018, 17:07Thank you for your replies, yeah, Timers are pretty easy since there is a drop down list for them in the GUI