Take a look at the 'Ghost shooter code' example. That stores various instances in global variables, which can also be used in scripts in event sheets.
Thank you for your answer. I learned a lot from this <Ghost shooter code>.,I got a lot of help with this question. Thank you.
In addition, is < await ()> equivalent to "wait" in the event table? I don't know how to use him yet. How do you make it wait a few seconds in script?