How do you make a simple shell game in ue5?

Lol I figured it out just now. My timeline was the problem. You are absolutely right. It works now. When I finish the last touches I will load a video here and closed it as a solution. You guys are golden.

1 Like

Could you check this for me? I am trying to make the cups come down and start the puzzle but after coming down,other code won’t work. I already checked the puzzle before adding the new code. Puzzle works.


Your script is using timelines which have Finished pins. There’s no need to rely on collision. Run the script once the moving timeline has completed.


If you need to learn more about collision:

1 Like

I am once again bothering you. Sorry about that. I am happy with the result and trying to implement new things to it but I have another problem. I need to stop the cups instead of them looping endlessly in order to implement my new things.

Add +1 to a variable when the TL finishes, when threshold is reached, do not restart it.

1 Like

hmm I need to think a little bit more on what you said cause I have no background knowledge. I will try to figure out and be back. :slight_smile: thanks.

I took me a while to understand and figure out what you mean but I did it at last. But I am out of exec to use for next steps.

1 Like

Try the sequence node:

things are looking good :smiley:

1 Like

Once again I can not figure out what’s wrong. Can you check it for me? :man_facepalming:


so I am trying to choose the correct cup by clicking the left mouse button. I figured If I can set the left mouse button and detect the cup1 when clicked,it will fire up the top nodes on the right and if it can not detect the cup1,It will fire up the bottom nodes. I made a playercontroller and enabled click events. This code isn’t working :smiley: Something is wrong with clicking.

Try it like so:

For this to work, cups must block Visibility.


I tried making it a variable too but doesn’T work

I figured the problem. I spawn child actors and set the mesh invisible so when cursor is on them it turns yellow but spawned child actor blocks the original mesh.Therefore you can not click on it. I will try to find a work around

I have a question for you. So I spawn an object at the same location with the original cup and set original cup’s mesh to deleted mesh of another object to create an illiusion of yellow selection thing in the video. We enabled left clicking and it seems for that to work I need to find a work around cause the new spawned object blocks the original one therefore we can not click on it. Is there a way for me to set the collision of the new spawned object so that my yellow mark thing can work and at the same time ignore my clicking and let the original recieve it? If I cancel the collision I lose the yellow mark thing.

nope nothing works

Done :smiley: Thanks everyone!

1 Like

Congrats!

image

1 Like