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"

Possess more than one pawn/controller?

Hi all! For my game, when you interact with the NPCs, a chatbox pops up. You're supposed to press the interact key/button every time to go to the next message, but input events don't fire unless it's possessed. Is there any way to possess more than one pawn/controller at the same time so I can achieve this? If not, what could be a way to achieve this?

Thank you very much! :D

Product Version: Not Selected
more ▼

asked Apr 19 '15 at 04:08 AM in Blueprint Scripting

avatar image

326 45 62 72

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

1 answer: sort voted first

I kinda got it to work:

alt text

And then I have the interact / slash event inside my NPC. I wish there were a better way to do this, but it works.

more ▼

answered Apr 19 '15 at 05:46 AM

avatar image

326 45 62 72

avatar image Achilleon Apr 19 '15 at 10:45 AM

Hello Paragonz9.

Is there any chance that you can share how you were able to possess more than one pawn with just one controller?

My problem is, I need to control two pawn at the same time and at the moment I am casting to a second controller in my first controller to make things work. But if there is any better way of doing it, I would appreciate if you share it. Thanks!

avatar image jfaztk Apr 19 '15 at 01:13 PM

Hey there! I would, but here's the thing: I didn't. I couldn't find a way, I don't think it's possible without any C++. There are workarounds, however, like the one I did above.

So to do what I did you make a blueprint interface and inside it you add a bunch of functions called after your inputs. "Interface_Left", "Interface_Right", etc. Then what you do is you implement that same interface into both your character and the other object/pawn that you wish to control.

Then you'd have to get the instance of the other object/pawn. In order to do this, as you can see above, I used the "Get All Actors with Interface" function, which gives me all the actors that use the Control Interface that I created. Then I do a "ForEachLoop" in order to guarantee that it gets fired at every single one of them, and the last thing you see, the "Interact/Slash" is just the name of the input function.

Now inside of your second object/pawn (the one not possessed), you would have "Event Begin name of input function", and you would use that as if it were your input key.

Do you get what I mean? :)

avatar image Achilleon Apr 19 '15 at 01:23 PM

It is sad to see that there is always a work around, even at Controller section of UE4 it says "It is possible", yet doesn't tell how.

But yeah I get what you mean. Thank you for sharing your way. :)

avatar image jfaztk Apr 19 '15 at 01:24 PM

Yeah, np :P

(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