Trigger "Motions" with JS

Hello!
I'm trying to make a slip effect that can randomly cancel someone's action if he battles on Ice.
(And with right Boots you can avoid this effect. (I took this idea from my favorite game DOSII)
So the effect works perfectly, but one thing is missing: I want the user to do the "dead" motion when he slips.
I was able to do that in action sequences with "motion dead: user" but this obviously don't work in "<Custom Action Start Effect>
It should look like this, but I don't know how to trigger the motion:

if (Math.random() < SlipRate) {
user.startmotion"dead";

I found how to play an animation there, but this isn't gonna help me out.
user.startAnimation(x);
(I use Yanfly's scripts, like Buffs&StatesCore here)

Please help me!! Without this the effect is gonna look really bad... :/
Try "user.forceMotion('dead');". I'm not sure if this works. In case it does not, I have no other ideas too.
It works! Thanks! 😀 ♥
Would never have found this by myself xD

Is there any way to make the game "wait" for a certain time just after the motion ?
They just get up immediatly after, but I'd like them to stay on the ground for 1 or 2 seconds, like they just realised that they slipped)
Something like:
-wait: 60
or
-wait for animation (I can play an empty Animation)
or
-common event -> wait
But still with JS.
I know SRD has a plugin that can use wait for animation, if for an event, you can try
this plugin "Wait Options" by SRD, if for the notebox, than I dont know.

but you need to calculate the amount of frames for the animation
It's for the notebox!
But this plugin looks interesting, I may use it for other stuff, Thanks !

Edit:
Okay I found a solution to make the game wait until the animation ends:

"BattleManager.actionWaitForAnimation();"

I Guess we can close this thread ^^ Thanks for your help!
(Please delete this message, I should had edited my last message)
If you know some basic JS, you can look through the plugin Action Sequence Pack 2. I think you can find so many things about the motions of battlers there.

Original thread: https://forums.rpgmakerweb.com/threads/trigger-motions-with-js.121991/