I use the code provided by TheMadExile's right hand side box to create custom divs on the page that can update every turn.
However, sometimes I only want them for limited uses. For example, I have one that only does anything on the game title screen.
But with the code it will keep checking every turn to see if any more updates come. This strikes me as slightly wasteful. Is it a problem, or is there any way to stop the check each turn?
Though I suppose if someone wanted to go back to the title screen it would need to be active again so it probably shouldn't be disabled.
Comments
Code?
Regardless, to create a single-use task, all you need to do is to have the task delete itself. For example, a single-use postrender task: Just ensure you're using the correct parameter list (prerender & postrender have two, the other task objects only one).
For tasks which are multi-use, then you can have the task simply return early if conditions are not right, thus bypassing whatever it is they normally do. For example, a postdisplay task which contains an early return:
You can also combine them in various ways. For example: And: