Page 1 of 1

Random Animation

Posted: Mon Jul 20, 2020 5:58 pm
by Amine33
Hi tony
I hope you Doing Well
I'm Just Wonder if there A WAY to Play A random Animation...
For Example When The NPc Enter to Area Play Idle_1
End When enter For the Second Time Play Idle_2

Re: Random Animation

Posted: Mon Jul 20, 2020 10:01 pm
by Tony Li
Hi,

Since you're asking in the Dialogue System forum, I'll assume you want to do this in a conversation using a sequencer command. You can use the RandomElement() Lua function.

Example Sequence:

Code: Select all

AnimatorPlayWait([lua( RandomElement("Idle_1|Idle_2") )])

Re: Random Animation

Posted: Tue Jul 21, 2020 12:06 pm
by Amine33
thank you Very Much .

Re: Random Animation

Posted: Tue Jul 21, 2020 7:17 pm
by Tony Li
Happy to help.