It isn t yet possible I think, local variables can only be done inside an event or a group.
There is your answer. Put the "every tick" and local variables into a group, and then activate/deactivate that group whenever you need it. The other option is to put them into a Function and call it whenever you need it.
Also if you were going to be calling local variables every tick, they may as well be global variables, then none of this matters.