Trying to make a mario party dice roll all most there but

I cant seem to stop it no mater how hard I try.
Here what I’m trying.



basically using a timeline to lerp 0 - 10 but when I hit the space key to stop on a number. it sets to false alright and it it seems to be on diceNumber number. but the numbers keeps lerping and going and going and wont stop even though the flow is stopped.
Any one know why ?

1 Like

It looks like the logic is slightly incorrect - I think you’ll only want to play from start is StopRoll is false…

1 Like

It starts True and you saying I should only use Play from Start I tried that first But didnt work

1 Like

Maybe try removing the first branch on Stop Roll - change the default value to false and have the spacebar set it to true and change the last branch to false? Also it looks like you will get the number 10 over 90% of the time, you could make the Lerp between 0 and 10 and remove the >10 part unless that is what you are wanting to do…

1 Like

That didnt work stays on 0.

1 Like

That will be because you’re setting the Dice Number value to 0 - try removing that node

1 Like

causes a infine loop

1 Like

and goes 100 instead of 0-10 repeating

1 Like

Well - at least this is great practice for you to visualize the flow of the code :slight_smile: Can you attach a screenshot of what you have now? Did you change the Lerp to be between 0 and 10?

1 Like

1 Like

That looks very close - just change the last branch to flow back when it’s false instead of true…

1 Like

I dont get what you mean , can give me an
example?

1 Like

1 Like

I did that but I’m back at square one again it does the same thing.

1 Like

Plug the Timeline Stop pin into the space bar event, I hadn’t noticed you had removed it. Then it should stop playing the timeline when you press the spacebar, will go to the “Finished” out pin and because you’ve set StopRoll to true it will not restart the timeline.

Sadly that doest work I think Im going to destroy the 2 widgets and recreate them on the stop pin and see if that works

I just tried throwing together a quick blueprint to make sure it wasn’t a UE5 thing and it does seem to work but I didn’t make widgets, so that could mean it is the them causing the issues…

1 Like

are you saying a lerp is not possible

A Lerp is fine, I just added a random number generator too in that blueprint… Depending on the values from the timeline that is - if they are between 0 and 1 then it’s all good.

Here’s my widget.