It has nothing to do with ph3, it's the exact same in 0.12.
wait() is not a hardcoded function, it's user-defined:
function wait(n){
loop(n){ yield; }
}
You're getting an error because you don't have the wait() function in your script. You have to add it to your script in order to use it, otherwise you use loop(n){yield;}. They're the same thing, wait() just saves some typing. I'm sorry, I assumed you understood what wait(n) meant so I used wait(n) and loop(n){yield;} interchangeably.
I'm not exactly sure how I can explain this better. When you use a yield, it stops the code there and moves onto the next thing to do, until the next frame. This is how you get danmakufu to seemingly run multiple tasks at the same time. On the next frame, the task/whatever will start from that yield and continue until it yields again or finishes. So if you have a loop(20){ yield; }, danmakufu will yield, wait for the next frame, then yield again, and yield again, 20 times. In this way, it's "waiting" 20 frames. We use the wait() function defined above to save a bit of typing and make it clearer what we're doing.
I really want you to understand this. This is a fundamental part of danmakufu scripting. Just giving you code to copypaste for all of your problems might be nice, but if you get to understand how the scripts actually works then you can do so much more without having to ask for anyone's help. I have no problems helping you, but understanding what's you're actually doing is obviously important!
Also, most things you're currently doing in ph3 are the same or very similar to how you'd do it in 0.12. Most of the early differences in ph3 come with the increased focus on objects, and the new drawing rules. Most of the real heavy differences only show up when you're doing more advanced scripting. Because the people working on advanced scripting are going to be more knowledgeable, we don't really have a need to make tutorials for ph3 right away, especially when the program is still being updated. If people really want a tutorial on ph3 and we have some actual interest in a subject to cover in a tutorial, then tell me and I'll do it.