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"

Help Getting Casting Overlap Event to Overlap Different Objects

I am having trouble getting an object to cast to another object when overlapping other actors. The "WallCraftable" Blueprint is spawned as a child within the "HeroCharacter". I am trying to get it to change a variable in "HeroCharacter" when "WallCraftable" overlaps with another dynamic object.

It does successfully cast this variable change "CanPlace" within "HeroCharacter", but only when the "WallCraftable" is overlapped with "HeroCharacter". I need it to fire if "WallCraftable" overlaps pretty much anything else.

I used the print string command to test and it is generating a overlap event any time the "WallCraftable" object overlaps any other dynamic object, including itself, but it does not change the variable "CanPlace" within the "HeroCharacter" unless it is overlapping "HeroCharacter".

Can anyone help with this? Thanks

alt text

Product Version: UE 4.19
Tags:
more ▼

asked May 21 '18 at 08:55 PM in Blueprint Scripting

avatar image

Rel Sanct
3 1 5

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

1 answer: sort voted first

for your specific case you dont want to be using the other actor pin for the object pin on the cast. since you want a overlap with any actor to set the variable then you just need to have a reference to the character as the object in pin. in the example below i used the get player character as my reference, though there are many ways to set a reference depending on the situation. from there you just need to drag off the cast to get the variable you want from that character. you can also set the collision settings on the wall to limit which objects can cause an overlap if you wanted to.

alt text

capture.png (70.7 kB)
more ▼

answered May 21 '18 at 09:33 PM

avatar image

ThompsonN13
10.1k 33 10 25

avatar image Rel Sanct May 21 '18 at 09:42 PM

Ah thank you, this worked perfectly!

(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