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"

Pressure pad puzzle

Hello, I am working on a boss puzzle where the player needs to stand on three different pressure plates for a set amount of time to do damage to the boss. I am assuming the best way to do this is to set up trigger boxes where the pads are going to be, and write a blueprint for when the player is inside of it for x amount of time the boss takes 1 point of damage, the pressure pad becomes inactive, and a spotlight thats above the pressure pad turns off, and when all three pads are inactive the boss dies. Also I am the 3d modeler for this so im not 100% on doing this, so any screen shoots or explaining in easy terms would be really helpfull

Product Version: Not Selected
more ▼

asked May 05 '18 at 08:06 PM in Blueprint Scripting

avatar image

1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

the picture below shows one method to accomplish this. ill try to run through the basics here. everything here is based on overlaps, so on begin overlap we first make sure that its the player that is overlapping (get player character, equal == nodes) so that we dont run into the issue of other enemies activating the trigger. at the same time we also check to make sure that the trigger actor is active and can be used, this is done with a variable (triggerActive?), later we will set this variable to false when the trigger is no longer active. so if the player is overlapping and the trigger is active then the branch is true and the script moves on to the next part. A similar process is used for on end overlap. when the previous steps are true then we come to the sequence node which activates both outputs almost simultaneously, this opens the gate and activates the delay. the delay is what ensures that the player remains i the trigger for the specified amount of time before the rest of the script can execute. so on entering the trigger the gate opens and if the player exits the trigger then the gate gets closed. if the gates closed then the the enter pin wont work. that was probably confusing and hard to understand but test it out and im sure itll become clearer. the last part is to damage the enemy boss and deactivate the trigger. i used custom events for this part to keep things neat, but you could easily change that. the damage boss event just takes a reference to the boss and applies damage to it. you could get this reference easily by making the variable editable/public and setting it in the details panel once youve placed the actors in the scene. the deactivation is where things are really up to you on implementation but i set the variable to false so the trigger cant be used again and set the lights intensity to zero.

i made this as self contained blueprint actor so that it can be reused in your level. what that means is that you make this actor then you can drag multiple copies into your level, if you want 3 triggers to apply damage then drag in 3 copies of this actor. if you have questions let me know.

alt text

capture.png (405.3 kB)
more ▼

answered May 05 '18 at 11:52 PM

avatar image

10.1k 33 10 25

avatar image Gatare May 06 '18 at 01:12 AM

Thank you very much, that is complex but i think I understand most of it. I will try that, thank you very much again

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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