Random Animation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Amine33
Posts: 22
Joined: Mon May 21, 2018 4:48 pm

Random Animation

Post 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
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Random Animation

Post 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") )])
Amine33
Posts: 22
Joined: Mon May 21, 2018 4:48 pm

Re: Random Animation

Post by Amine33 »

thank you Very Much .
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Random Animation

Post by Tony Li »

Happy to help.
Post Reply