Wait function

Im having some trouble with my script,
the code is written somehow like this
this._waitCount = this._waitCount + num;
//ACTION 1
this._waitCount = this._waitCount + num;
//ACTION 2
but what it does is perform Action 1 and 2 then wait 2*(num)frames rather than wait, Act1, wait, act2 which is what i am trying to do.

I could just write it in the event editor but the actions performed is repetitively interacting with some of the arrays and variables inside the script so putting it outside would probably make the whole thing fail

If there is someone who had encountered such problems and had solved it somewhat in the past, or someone who knows something that can help, kindly comment bellow☺️😍

thanks for the future response.
Godbless!😀
Please give the entire code - in your snippet there is nothing conditional for checking numbers or for waiting, so of course it will proceed in one seqeuence.

Original thread: https://forums.rpgmakerweb.com/threads/wait-function.81328/