How do I reset a blueprint after an event?

Im building a game that has a pit that you can fall down into with platforms on either side… if you jump straight to the bottom, it teleports you back to the surface world, but if you land on the last platform, it destroys the teleport trigger of the first pit - basically to mimic a safe fall distance…

I have a second pit that you can fall into, which is located below and offset from the first pit, when you hit the bottom of the second pit, it teleports you to the surface, but the first pit teleport has been destroyed because of the platform trigger…

is there any way that the first pit teleport trigger can be re-activated after teleporting from the second pit ? … ive tried the load level node, along with a console command of reloading the level, but neither have worked and i cant find anything online and I think I might go crazy if I cant fix it

Note : pit 1 and pit 2 are both in separate BP’s

This is done in BP?

If so, why not respawn the first trigger when you need?

thanks for the reply :slight_smile: ive looked everywhere online and cant find what you mean by, ‘respawn the first trigger’, or would i do it by spawnactor ? if this is true then should i do it within the first or second BP ?

Hi.
Instead of destroying yout trigger, can’t you just open or close a gate in its script. This way you can easily make your trigger active or inactive.
Would that work for you ?

Im not sure if that would work as Ive never used a gate node before… Im still new to blueprints as i’ve only recently transitioned to UE4 from UDK3 … A friend of mine is having the same issue, where his action (lasers) can kill the player, but when the player re-spawns at the checkpoint before the lasers, there is no way of resetting the blueprint in which the lasers are contained (or at least we haven’t found a way) so the lasers are still active… a few of us have tried and not succeeded, we are all artists as well so hopefully my questions will be a bit more forgiving :smiley: … In its basic form, if you die in a trap and you get re-spawned to a checkpoint, we need the trap to be active as if the level has just started again, but from the checkpoint, so the player cant just walk straight past the trap on the second try :slight_smile:

Well I’m an artist too, so with both our brain, we may eventually get a nice clean bug =)

As far as I know, there’s no automatic way to reset a blueprint, you should just create a reset function by yourself, and call it whenever needed. And this reset function would set all your relevant variable to their initial state. Like a boolean to set your laser active or inactive, or the angle of the laser. See ?
Basically, you can call this function on begin play, so it sets your blueprint to an initial state, and call it again when the player respawns if that’s your design. Does that sound reasonable to you ?

Haha hopefully :smiley: Your brain will work much better than mine with this Blueprint stuff though

Awesome, ill give that a try, it sounds like a very good way to approach it, its just getting myself to do it, not that im lazy, just not very good, or at least very efficient with BP’s just yet :slight_smile: Also thank you for your help, Its very much appreciated… Im going to reply with my screenshots of my BP’s for each pit situation just incase my explaining wasnt clear to anyone else who see’s this …

Glad to help.
Anyway, for your trigger scenario, there’s just one thing you’d like to control : if the trigger is active or not, is that so ? If so, then you shouldn’t destroy it, or you’ll never be able to resurect it, you’d need to spawn a new one.
So, if you want to go with the clean, generic method of having a reset/initiate function, just make your activation a bool variable, and test this variable at every “begin overlap” event (with a branch, that’s easy to find and to understand).
From there, if you want to activate or deactivate youe trigger, you just have to change the value of this bool variable. So your reset function would just do that, set this variable to its initial state.
Have fun learning BP, that’s kinda great =)