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?
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!
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.