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"

Tracing MultipleActors and acting per Priority

Hey all, I'm working on a generic player interaction function using a spheretracebychannel (mostly following the recent blueprint communication livestream vid),

Essentially I've got a player character that traces the sphere ahead of him and tells an actor to "Do Something" and that something of course depends on the actor, I've got the basic functionality working great and am now curious about going a bit deeper with it. Specifically how would i go about Getting multiple traces within range & also assigning priorities levels to objects so that if I trace multiple or overlapping interactables only the highest priority one would fire?

For example: Im working on a treasure chest, that randomly spawns loot on interaction, My current test scene includes a Loot Container That when interacted will randomly choose an item to spawn inside and then animate opening the chest (btw the container also can close on a second interaction). All of this works great. But if i want to make the spawned item inside using the same interact key I'd need to kill the chests collision object. But since i want to be able to reclose the container, is there perhaps an alternate way to go about this?

My initial thinking was try to use the multispheretrace and then some how break the results, then looking for two variables perhaps an INTERACTABLE? boolean to flag any actors containing the functionality, then maybe use an integer variable called PRIORITY on different objects to determine the Priority of which should be the receiver of the interact function. Buuuuut im not sure how to proceed from where i am.

Pics included are my interact function pretty much direct from the livestream & my Hyrbidized Lootcrate on Interact function. Any suggestions, teaching tips or habits you guys could pass on would be much appreciated :)

EDIT I should have mentioned that i'm doing a top down overhead JRPG style game, Otherwise a simple line trace probably would have been enough.! alt text

alt text https://answers.unrealengine.com/storage/temp/80865-multiinteract.jpg

alt text

Product Version: UE 4.10
multiinteract.jpg (299.6 kB)
chestinteract.jpg (584.8 kB)
rpgtopdownstyle.jpg (287.4 kB)
more ▼

asked Mar 03 '16 at 11:00 PM in Blueprint Scripting

avatar image

18 2 6

avatar image WeTheFallen Mar 27 '16 at 02:30 AM

i haven't made much progress on this one, any suggestions to how i could achieve multi results on the trace but then execute only on the single highest priority item in the batch of results? Ive tweaked my oriinal idea to work lthis way now, but I'm at a loss how to go from here (how to go about reading each hit objects "Priority") alt text

multi obj.jpg (173.0 kB)
(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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