Download

Quick way to do a 'play again' button?

I’m just making a VR experience based on a local WW2 event where we got bombed by the Germans. It’s only 2-3 minutes long but I’m going to have to put various people on it one after another. Just been doing a few searches but haven’t found what I’m after, which is just a simple way of playing this experience over and over again by pressing space bar or something.

Anyone know which specific blueprint terms or general things I should be looking at to figure this out? I imagine I would have to get something in the matinee timeline at 3 minutes to say where the experience ends and then loop to the beginning. Probably something in level blueprint to use say ‘space bar’ as start. Just quite new to Ue4 so the specifics are alluding me.

Thanks

Chalk

hi chalkgsy,

I been doing a lot of these VR event things lately here is how I handle it:

FadeExample.jpg

This is set in the level blueprint, at the start the players camera is faded in for a nice smooth introduction, then a delay of your choosing, then fade out. The fade out will stay like that until you hit the R key which will reload your map, this way when one person finishes the screen will be black for the next person, just hit R when the next person is setup. One extra bonus of doing it this way is that you can also fade the audio at the same time.

Thanks you’re a total legend! Was beginning to panic as have a presentation on Tuesday for this project and couldn’t fins any info on this at all. Really need to learn blueprint more.

How does it know when the level/experience has ended by the way? Is there something in matinee you add to ‘reload’ the level from start? A trigger of some kind?

Thanks

Theres nothing worse than a deadline closing in thats why I thought I would help:)

On the example I gave the delay is what drives the end of the experience, its set to 180 seconds, once the timer has finished the end fade will begin and keep the screen in black with no audio until you hit the R key and that will reload the level, I believe that you could replace that with a restart level console command if you wanted, just make sure the name of the map you want to reset is in the Open Level node.

Hope that makes sense.

In the example, I would add a boolean that checks to see if the level has ended. This way the user can’t load the level before it has finished. If you’re using a Rift or other HMD device, make sure to add in a “Reset HMD” after the begin play, and before the fade in.

7e17031b3ce041c67a182171e625483a422bcf6d.png

All great stuff! Will hopefully get all this done over the weekend. I’m just also trying to render this thing out to a 360 video as well for mobile phones and cardboard/gearvr use as well which is proving to be a whole load of fun and games!

That blueprint worked perfectly. Thanks again chaps! Now i’ve got a bit of room to breathe i’m trying to learn a bit more about blueprint. Looking to do something like the showdown demo, where there’s a scene you start in then press space to start the experience (next level), then at the end it goes back to the loading scene. Do you do that by just having a level blueprint like this in 2 separate levels where one loads the next one in the same way? Also: and this might sound like dumb question - How do you tell your level to be ‘finished’ exactly. is that something in matinee do say how long the whole experience is before looping back to the loading screen?

Cheers

K

They use level streaming for that. Instead of “Load Level” you need to use load streaming level… Recommend to read the wiki as the topic is pretty big to go over. As far as determining when the level is finished, that is up to you. You can use a timer as Chillbody did or by some other method. Can’t really say much other than that without seeing your project. The “Play” matinee node does have a finished output though if your driving everything by matinee. Like I said, hard to say w/o seeing the project.