x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

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

Product Version: Not Selected
Tags:
more ▼

asked Apr 07 '15 at 01:33 PM in Blueprint Scripting

avatar image

mikeystar93
4 5 6 8

avatar image Narghile Apr 07 '15 at 01:40 PM

This is done in BP?

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

Narg

avatar image mikeystar93 Apr 07 '15 at 06:41 PM

thanks for the reply :) 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 ?

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

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 ?

more ▼

answered Apr 07 '15 at 07:06 PM

avatar image

killfassil
91 2 5 9

avatar image mikeystar93 Apr 07 '15 at 07:37 PM

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 :D ... 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 :)

(comments are locked)
10|2000 characters needed characters left

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 ?

more ▼

answered Apr 07 '15 at 07:55 PM

avatar image

killfassil
91 2 5 9

avatar image mikeystar93 Apr 07 '15 at 08:11 PM

Haha hopefully :D 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 :) 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 ...

avatar image mikeystar93 Apr 07 '15 at 08:11 PM

alt text

screenshot (15).png (241.1 kB)
avatar image mikeystar93 Apr 07 '15 at 08:12 PM

alt text

screenshot (16).png (268.0 kB)
(comments are locked)
10|2000 characters needed characters left

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 =)

more ▼

answered Apr 07 '15 at 08:35 PM

avatar image

killfassil
91 2 5 9

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question