Slot machines

Hello everyone!

I have quick question. What is the easiest way to create slot machines? For the instance, I want four signs to match, and when they matches player wins. Is it good to animate it in matinee, and then call functions when they matches? Or totally in blueprints through actor rotation nodes, or anything similar?

Thank you!

Hi man ,
Sure, you can make a Main cube. and make him Spin and stop by blueprint.
At every side of the cube you can make other cubes . give them a material with a texture to show it properly.
So when the main cube roll. all the face-Cubes roll with him.(static meshes in actor)
You can use matinee or script the animation for the Lever you pull.
Than start the Spinn function for every cube. wait until all they are stopped, and then check via raycast. Just wich material is applyed to the static mesh in front.
Surely you can use more faceted mesh then a cube. like a prisma with 6 or 8 faces.
Its easy & quick

Hello Est_engine! Thank you for the answer. Hm, I got certain things you mentioned. Though, it’s still a little bit unclear to me.
Can you dig up some screens for me, or it would be even better to chat on Skype or somewhere else so I am on the right track?
Thank you again!

Hi man ,
here a sample of how should be work.

However let me say that you should try to build something up and then come back with question about something that dont work , or as you already done : ask for wich direction take.
Otherwise people like me cant surely build up a game from nothing solving all problem or give answer that can make you the perfect work in notime , above all , we dont know with the right precition what you want or need to do .

Hello again! Many thanks for the picture of how it should work.

I just tested your solution, though something is not working on my end. Here are the pictures of it. What is happening is that “slots” rotate for 45 degrees or so and then they stop, without any string of WIN or LOSE. Also, I want slots to start when I hit left mouse button. Tried with that, nothing is happening at all.

Also, just an quick update. When I use World Rotation, instead of Relative Rotation the slots are spinning nice and easy. What I need though is this to play once, so for the instance, when you click mouse they spin for 5 seconds and then stops, if you lose (don’t match four of them), you can then spin another time when mouse is clicked, and repeat that forever when you are in the game. What is happening now is that function to check if it is correct runs once and calls lose print string, and that function is not called anymore.

To use the mouse event you need to possess a pawn or activate the input on your own. Mouse Control Setup | Unreal Engine Documentation
You have to set up all the stuff in this page.

Then , in the tick event you got the float value of time passed from every tick.
store and add every tick , your amount of time. once that variable reach 5 or more, you can start to slowdown the speed.

Put in a variable booleand called “Playable” use this to do, or not do , the mouse click to start the game.
You can set playable on at the end of the checkwin. and just after the click , set it back to off.

If you build up your ClickmouseLeft event , calling the spin event, it will reset the game end. so the check will be performed again.

Okay, so I managed to stop the machine after five seconds (or whatever number I set) and it is checking if the materials are matching and I am always losing because of World Rotation as it is moving same all the time. Is there any way I can use Relative Rotation, and then stop the slot always at the same place as where was it at the beginning?
After I solve this, I will get onto mouse event.

Give a try to this, about relative rotation and world rotation.
Use an actor with input enabled for character controller 0. you can rotate the ufo in X world to make it upside down or diagonal … but with Q, you can rotate the ufo on the z of the sphere. so it just make spin the wheel .