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"

Trigger volume inside Player controller blueprint

I have created a new Game Mode-Player controller so I can swap from my usual character to a boat. I got it to work, but I want that it only works when the character is inside a trigger volume. The image is the blueprint from the Player Controller. Thanks! alt text

Product Version: UE 4.18
Tags:
captura.png (126.5 kB)
more ▼

asked Apr 25 '18 at 04:38 PM in Blueprint Scripting

avatar image

DafneMiguez
1 1

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

2 answers: sort voted first

Hey dafinemiguez,

You could either put a trigger in the player bp or boat bp. I suggest the boat. OnOverlap you can check if the player inside the trigger connecting a cast to thirdpersonbp from the other actor. In your thirdperson have a boolean that is "can boat" or something and set it to true if the cast is a success. Then in your "Enter" button press, check if this variable is true and then continue the code. Youre also going to want to set the variable to false once the overlap is exited by the player. Let me know how this works!

more ▼

answered Apr 25 '18 at 05:11 PM

avatar image

vivalabugz
729 10 8 13

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

Thank you, it worked!! But now the exit option doesn't work.

Player Controller Blueprint: alt text Boat blueprint: alt text ThirdPersonBlueprint: alt text

boat.png (161.9 kB)
third.png (253.3 kB)
more ▼

answered Apr 25 '18 at 06:00 PM

avatar image

DafneMiguez
1 1

avatar image vivalabugz Apr 25 '18 at 06:26 PM

think youre having a problem because you are casting "boat" to thirdpersoncharacter. You should probably still be casting the player controller. You also want to remember to set the "can boat" to false when exitting, otherwise if you hit enter when you are not in the trigger after leaving it, you can still possess the boat

(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