Download

Newbie needs some help please. Toggle visibility from a trigger volume.

Hi all,

I’m very very new at Unreal. I would love some help if possible.

I’m trying to make a trigger volume once triggered, turn on a floating platform. The platform is only on for 5 seconds (per the timeline), then turns off. The player will then be able to trigger the platform again from the trigger volume.

This is what I currently have…


Currently nothing really works well. The platform turns on, but doesn’t follow the timeline. Also, only the mesh is turning off via the toggle visibility. In this situation, I need both the mesh and the collision to turn off.

Any help would be greatly appreciated!

Thanks,

​​​​​​​Chris

I guess I’m trying to make something like in super mario.
Player touches the trigger
Platforms appear for a peroid of time
After the timer, the platforms dissapear
Player then can reset the timer

I have something in a current project that should help you with this.

What you could do is in the level BP set up the trigger to make the platform show.

Use the “do once” node I believe it is, after the “begin overlap” and toggle visibility for the platform to show, set a delay for a few seconds and then toggle visibility again to hide the platform. And the output from the last visibility node, connect it to the “reset” on the “do once” node so then the player can activate the platform again. Then try deactivating the collision for the platform.

Frosty, to get the effect you want, you need to use the Scale3D node.

Also, to make things much easier, you need a BP for the tile, and a BP for the trigger. Once you have them setup, you can just layout the level with no more coding.

Come back here if you’re interested.

( Scale 3D if you want the plaforms to appear with animaton, visibility if you just want the change to be sudden )

I did it anyway…:

ezgif.comoptimize.gif

Thanks so much dude. I’ll give it a crack in the morning!

I’ll let you know how I go.

Great :slight_smile:

When you put the tiles in the level, need to give them an actor tag. It can be anything, like ‘bridge’ or ‘stairs’. And you set the parameter on the corresponding switch to the same ( ‘bridge’ etc ). That way, the switch knows which tiles it’s operating.

Tell me how it goes…

I’m lost on the last part of the trigger.

I think it has something to do with the tagging element. The switch and the platform don’t have a relationship yet.

Again im sorry, I’m very new at this.

I have made both blueprints as actors, but thats as far as the tag element I know of sorry.

Sorry for the late reply, you have to quote people on the forums otherwise there’s no notification.

So, trigger BP. You have that right the tag is just a name. Correct.

This is how it works:

  1. Place a tile in the viewport

In the details of the tile you’ll find the place to put the tag:

I’m gonna make bridge here ( for instance ), so I put ‘Bridge’

Now I can alt-drag the tile, and they all have that tag:

  1. Configure the trigger. Put the trigger at the correct point and setup a couple of variables:

You see here, I’ve put the trigger in front of those tiles and I told it the tag to look for ( bridge ), and how long to tell the tiles to live ( 3 seconds ).

Then you just hit play :slight_smile:

So you can see, once you code a single tile and trigger correctly, you can now setup a whole level without any other code! :smiley:

Come back again if you get stuck:

ezgif.comoptimize.gif

No worries dude, thanks for getting back to me and giving me some more help!

I think my issue is, I can’t find the event “show” in my trigger. I can find it with context sensitive turned off, but I can’t connect the array element, as the trigger doesn’t reference the platform (bridge) pieces.

So I got it to work. But I had to do some hacky stuff, since I couldn’t directly connect to the array.

You have to pull the pin from ‘Array element’ because that’s the thing with the Show custom event :slight_smile: