Call a new function and inside this function set the my-pointer to the entity's pointer.
you don't have to do it inside.
you can do it from outside like that:
my = entity;
new_function();
my simply is a global variable that always gets stored/restored by wait().
I'm trying to do it programatically at the start of my script.
i do something very similar in my python wrapper. only with lite-c the WED actions get started automatically. in my python wrapper i have to do it manually. so i have my own level_load() function which reads the action names from the wmb file and then simply sets the my pointer before calling the right function. it works exactly like in lite-c.
and you could modify a wmb file of course. the file format specifications are in the manual. you could look into my a7_scheduler.py and the function get_actions() to see how i read the actions. writing the actions would only require some small changes.