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"

Mouse Cursor and Inputs | Possessed Pawn

Hello! I am trying to use enable/disable mouse and use custom action inputs as a Possessed Pawn.

Currently, I possess a pawn with a key event "F" and flip/flop possess MyCharacter. I am trying to figure out a way to enable cursor and mouse events for UMG HUD Widget while possessing another pawn.

I found the "Auto Receive Input" but even having this enabled, key events that would trigger UMG events, doesn't work. Maybe there is something I am missing?

Also, I noticed that when using possess pawn, the pawn automatically receives the UMG HUD widget that is added to View Port in MyCharacter.

On that pawn, I want to have a different UMG Widget added to view port. This works if I change the default pawn in MyGame to the pawn in question. Why does possessing a pawn not use the Widget that is being added to view port?

Product Version: Not Selected
Tags:
more ▼

asked Mar 22 '15 at 06:41 AM in Blueprint Scripting

avatar image

mdmoberly
205 13 25 27

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

1 answer: sort voted first

I found the "Auto Receive Input" but even having this enabled, key events that would trigger UMG events, doesn't work. Maybe there is something I am missing?

You should try "Inputmode UI and Game" (it's a bit longer but I can't recall the exact name). If you search for "UI and" in the context menu with the reference from your widget (the pin you get form "Create Widget") it should show up.

Also, I noticed that when using possess pawn, the pawn automatically receives the UMG HUD widget that is added to View Port in MyCharacter.

On that pawn, I want to have a different UMG Widget added to view port. This works if I change the default pawn in MyGame to the pawn in question. Why does possessing a pawn not use the Widget that is being added to view port?

Where is it added? Unless you are removing the widget on "Unpossess" and add a new one on "Possess" it will just keep your current widget. So if you added it during the construction script, event begin play or anything like that it won't change.

Cheers :)

more ▼

answered Mar 22 '15 at 10:49 AM

avatar image

Erasio
5.9k 291 86 293

avatar image mdmoberly Mar 23 '15 at 04:25 AM

Say that MyCharacter is adding GameHUD widget to view port via event begin play, and on MyPawn I am adding SpectatorHUD widget to view port via event begin play.

If I change MyGame to use MyPawn as default, the SpectatorHUD works, but if I possess MyPawn, I am still receiving the GameHUD from MyCharacter. I am assuming it is because I am "possessing" the pawn..

nonetheless, I have come up with a simple toggle (flip/flop) that will allow me to switch my HUD widget based on bool - It works fine!

Now with input.. I have tried a few different things as far as setting the input to Game and UI, which was able to enable my mouse and I could interact with the UI. However, I want to setup key events to add widgets to view port while possessing the Pawn (TAB to show menu etc..) which do not seem to work.

the pawn is based off of "Spectator Pawn", should I be using this one or "Default Pawn"? Does it matter? I am basically wanting a flying pawn that can use key and mouse events that can interact with the HUDWidget and objects in the world via click events.

Sorry for the long reply... But if you have any advice, that would be awesome! Here is BP_MyCharacter toggle that I set up..

mycharacter.png (364.4 kB)
(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