question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

multiple animations picked randomly

See original GitHub issue

I have 3 animations for 1 object and I want them to be picked randomly. I am not sure what is the best way to do it…

I could have 3 .json files and randomly loop between them… …or I could have the animations run from frame [0-100] [100-200] [200-300] and when the animation reaches frame 100/200/300 to randomly jump to frame 0/100/200. Is any of these options possible?

I couldn`t find any similar examples… Any suggestions are welcome.

final code I have used one json to randomly play, different segments: https://codepen.io/kiriss91/pen/MWbVbmr

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:18

github_iconTop GitHub Comments

1reaction
kiriss91commented, Mar 30, 2022

I am not a developer, but probably it is possible… This is a closed post; you should create a new one. I don`t know if anyone will check this one.

1reaction
bodymovincommented, Sep 26, 2018

yes, you can use the enterFrame or the loopComplete event

Read more comments on GitHub >

github_iconTop Results From Across the Web

choose random animation - Unity Forum
I would like to just pass the animator just one bool, and then have a bucket of random isShot animations to play.
Read more >
Multiple Animations - Scripting Support - DevForum | Roblox
I have a few custom animations made for my sword (5 to be exact) I want ... it takes two numbers between which...
Read more >
Apply multiple animation effects to one object - Microsoft Support
Select the object on the slide that you want to animate. · On the Animations tab, click Animation Pane. Open the Animation Pane...
Read more >
Blend by speed and multiple idle animations
If you want to do it inside your animation blueprint, you can use a Random Integer in Range linked to a Blend Poses...
Read more >
How to Use the Random Expression in After Effects
There are many applications were the random expression can help ease the burden of small tedious animation tasks that slowly eat at your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found