Skip to main content
Known Participant
May 29, 2020
Question

Creating a dynamic slot machine animation

  • May 29, 2020
  • 1 reply
  • 3695 views

Hello everyone, 

I want to build a slot machine project, and I need it to be dynamic.

I want to be able to control each time what three icons will be displayed when the wheels stop spinning.

I don't want to build it in the traditional way with three vertical strips of all the icons and then animation the Y position, I want it to behave like a particle system that generates instances of the icons on the fly, and knows which ones to pick according to the outcome I choose.

 

Any Ideas?   

 

Thanks

 

 

This topic has been closed for replies.

1 reply

Martin_Ritter
Legend
May 29, 2020

I don't see the point in the instance-generation approch.

 

You have to pre-build the icons in every case, so why not pre-building all icons and map them? If the desired icon is a circle, you can translate "circle" to any position, layer index number, array index, or however you build things up.

 

Keep in mind that an Expression for such a purpose will be fairly complex, might executing very slow due to the "hold value" problem. Evalutate if keyframing will be the better and faster solution.

There is also a cross-way where you would keyframe animate all posibillities and use expression to "choose" the corresponding animation.

 

*Martin

 

 

 

 

Mathias Moehl
Community Expert
Community Expert
June 1, 2020

You could use a precomp for each icon. Inside the precomp you could put one layer for each possible symbol and then show / hide those with expressions as I show in this tutorial

https://mamoworld.com/tutorials/data-driven-animation-json-after-effects-part-3-showhide-layers

However, I agree with Matin, that this would be unnecessarily complex and slow, so using what you describe as the traditional way might make more sense.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects