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"

Multi Trace Duplicates Items

The multi trace function i created has a chance of duplicating the item depending where your standing in the sphere collision for the item meaning that if i try to pick up a medkit from the ground it could pick up the apple instead while still destroying medkit actor since it shows more than 1 of the apple but when i print string for debug it shows correctly what has been hit. In the image below, Debug is orange and the function is blue on print strings. Why does the function duplicate while on my debug it uses the same function but shows correctly?

alt text alt text alt text

Product Version: UE 4.18
screenshot-17.png (671.5 kB)
screenshot-18.png (207.8 kB)
screenshot-19.png (212.0 kB)
more ▼

asked Apr 11 '18 at 05:59 PM in Blueprint Scripting

avatar image

DevBot YT
1 1 2

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

1 answer: sort voted first

In the MultiTrace function AddUnique doesn't add the apple to the array, but the next node does debug log it a second time. I believe this is why you're getting different printed results.

If you only want to print string added elements you could branch with the return value of AddUnique and test for != -1 (index none is -1, which in this case means it's already in the array and wasn't added). In the future lookup blueprint debugging so you can place a breakpoint (f9) and follow what is happening.

I think multi sphere trace returns all overlaps so if your apple has two components with visibility trace channel then apple will be in the results twice. You might want sphere overlap actors instead, especially since your start and end location are the same and there is a handy actor class filter.

As far as which item it is picking up or deleting, you'd have to post those graphs. Try blueprint debugging yourself first. GL

more ▼

answered Apr 12 '18 at 03:30 AM

avatar image

56 9 6

(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