How to stop moving platform while widget is on screen

Hi Everyone!

I have a unique problem that I have been searching for an answer for and can’t find a solution. The player is on a moving platform and while he is moving I have objects that can be clicked on and interacted with. Clicking on an object brings up the interactive widget menu but I want to stop the player at their current location while they are in the menu. Then after exiting the menu the player continues along the moving platform.

Some key things to note on what I have tried:

  1. Using a “set game paused” node works but then it doesn’t allow the player to tumble inspect the 3D model in the widget
  2. Using 'set global time dilation" node works but then it doesn’t allow the player to view a media video in the widget

The widget has 3D model tumble, audio and video so it seems no matter what method I use to pause the rest of the game while they are in the widget it also effects one of my interactive functions within the widget.

This is my current blueprint for my moving platform object.

Any help is really appreciated! Thanks everyone! :slight_smile:

Why not stop the Timeline when the widget is open? Wouldn’t that work?

I want to stop the player at their
current location while they are in the
menu. Then after exiting the menu the
player continues along the moving
platform.

Perhaps I misunderstood this. What do we want to stop? The player, the platform or both?

Yeah we are just trying to stop the platform. So I went back through and created custom events attached to the timeline for “startmovement” and “stopmovement” but I’m not sure how/when to call these events when the widget gets opened up.

I think the other thing that complicates this is that the widget doesn’t open through the main level blueprint. It opens through a separate component. I wanted to be able to change what was interactive so I made a “clickable component” that I can add to any object. This component is what opens the widget menu.

Thanks for your help! :slight_smile:

I think the other thing that
complicates this is that the widget
doesn’t open through the main level
blueprint. It opens through a separate
component.

I’d say that will make it easier, actually.

I wanted to be able to change what was
interactive so I made a “clickable
component” that I can add to any
object.

Clever.

  • for the above screenshots, they are 2 different blueprints, right? The second one is the component, correct?
  • those components are owned by the objects the player is interacting with?

Trying to wrap my mind around it.

So:

  • the player rides the platform
  • an actor (with a component) shows up, we click the actor and its component creates a widget
  • interacting with the widget stops the platform

How close am I?

Assuming I got it right and the widget has a button:

Instead of creating additional Custom Events to Stop Start timeline, you can:

Both will work fine, ofc.

Hi!

Thanks so much for diving into this. I always realize it’s so easy to describe the problem when you’ve been working on it for 2 days but much harder to come in and try to understand it.

  1. Yes the two screenshots I posted are two different blue prints. The Platform blueprint and the Clickable Component blueprint.

  2. So you are correct. The player gets on a moving platform and then sees an actor with a clickable component attached to it. The player clicks that actor and the clickable component then brings up the entire widget. When the widget is up I now need to stop the platform at it’s current location until the player closes the widget.

I am starting to understand a bit of what you posted so I will fiddle with that a bit on my end. My only question right now is what do you mean by “the widget has a button”

Thanks again for your help!

If you want the game to stop when a menu is displayed, you can use SetGamePaused.

Thanks, yeah I tried that but sadly I have other functions inside my widget that stop working when the game is set to pause. So I thought it was easier to stop the platform as that is really the only aspect that needs to pause during the widget interaction.

Ok that is what I figured. Yeah it needs to stop as soon as the widget opens up. So this was my first attempt at replicating your suggestion. It didn’t work but I think I’m missing something. What is the extra vector you are attaching to the End location? Also, I am casting to my platform blueprint not to the group actor is that correct?

IT’S WORKING!! Haha! Thanks so much for your help! :slight_smile: Now one final question… where/how do I now also make the platform start again after the widget closes. Do I cast to the Platform blueprint inside the widget? I’m getting an error on this compile? But am I on the right track?

The trace is not set up right. You’re tracing towards the centre of the world 0,0,0 so it’s quite likely that you’re missing the platform (no clue how your world looks like). Compare it to mine - trace down, from the player. I’ve assumed the player is not a giant and 200 uus (2m) is enough to reach the platform they’re standing on.

The rest looks spot on.

Also, I am casting to my platform blueprint not to the group actor is that correct?

Cast to the platform - we’re assuming you’re standing on that type of actor, otherwise, the cast will fail, which is also fine.

Don’t worry! I figured it out! I just copied the same code from the other blueprint into the widget blueprint to start it back up again.

Thanks again for all your help! I really appreciate it! :smiley:

the widget has a button

I thought we’re doing something in the widget to stop things. If it’s just the widget showing up and triggering the stop, run the trace script instead of the bind.

Just this then. As soon as the widget shows up, we check what the player is standing on, if’s a platform, we stop it.