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"

Hover over Actor in Multiplayer

Hey there, thank you for reading!

I have an event that causes my cursor to change color depending on what actor the cursor is hovered over--cursor is green if hovered over a friendly actor, red if an enemy actor, and default color if neither are true.

In single player this was easy to do as I could use an Event ActorBeginCursorOver on the actor itself and cast to the gameMode to change the cursor color. How can I accomplish this when there are multiplayer player controllers? ActorBeginCursorOver does not seem to know which player is hovering over it.

I tried a few things with using BindEvent to OnBeginCursor over on the actual playercharacter and casting to the desired actor--but I can not get that function to even fire (tried bindinging it from BeginPlay on the playercontroller).

Any thoughts? What is the correct approach?

alt text alt text

Product Version: UE 4.16
cursorhover2.png (89.4 kB)
cursorhover1.png (28.0 kB)
more ▼

asked Sep 29 '18 at 10:31 AM in Blueprint Scripting

avatar image

241 8 9 12

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

1 answer: sort voted first

Perhaps it would work to simply have the controller handle it instead of the hovered actor. The controller knows who itself is.

more ▼

answered Nov 25 '18 at 01:47 AM

avatar image

3.7k 18 23 20

avatar image samnater Nov 25 '18 at 11:37 AM

Thank you for the response! That is what I ended up doing--the player controller has an event tick on it that checks for hit results under cursor by channel--then I use that to see if a relevant actor is underneath the cursor and go from there. Not sure that is the most efficient method (it might be), but it works! Thank you!

(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