Announcement

Collapse
No announcement yet.

Struggling to get input working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Struggling to get input working

    Hey, think anyone could help me out?

    I'm trying to understand how the pawn/controller structure works in the engine and I'm running into a lot of issues.

    So im making a local multiplayer game, two players on the same screen viewed from the same camera.
    I've been trying lots of things to get this to work but still haven't been able to get things working.

    I tried initially creating a single character that initializes the other character but just got nowhere trying to do that.
    I tried using the level blueprint and the game mode blueprint nothing seemed to be working there.

    Now I'm using an object within the world to act as the game manager, it spawns two player controllers, then spawns two player blueprints.
    Initializes all their components such as color, position, and what I was hoping would be input but now no input ever gets registered at all and I'm totally confused.

    So I tried having the game manager possess each player with their appropriate controllers which I spawned, then run the function, enable input, on each one with the corresponding parameters.
    No go, nothing, no input, no feedback whatsoever. The players spawn fine and all their Update loop logic is running fine but I can't control anything.
    So I thought maybe I had to run these functions from within the blueprint itself, and still nothing! I wish there was at least some kind of way where I could
    view which controller is controlling what or if a pawn is currently possessed and by which controller.

    I've looked through the docs and answerboard and haven't really found anything that resolves the issue, sure seems like something that shouldn't be this difficult. I looked through the class defaults for the player and there isn't anything like Block Input enabled. The only time I've ever been able to get input working is when I set the blueprint to Auto Possess Player, otherwise it never seems to ever work no matter where or when I call the possess function. And even when I do that it never works for two players only one.

    Also tried to use the GetPlayerController function, tried setting the game to 1 player, setting the game to 2 players.
    I just tried printing a string on the event possessed node, and it is in fact getting possessed, I also tried making an event unpossessed node and it seems like it's not getting unpossessed so that's not the issue either.

    It's been super frustrating set of days, can anyone offer some insight?
    Last edited by kvick; 07-25-2015, 06:56 PM. Reason: Clarifying issue

    #2
    So I've basically been trying to do this since I woke up this morning, here's what I'm figuring.

    When you create a custom game mode and assign the default player controller to it, it is doing something different than when I run a Possess node and an Enable Input node.
    Because it never works, no matter where I put it, when I execute it, it's just not working. Either there's some real obscure checkbox I'm missing or I'm not running a certain function.

    I've been following so many different tutorials in the documentation and trying everything I find and nothing is working. I find it hard to believe its a bug in the engine since this would be a pretty major thing. When I try to follow this tutorial:

    https://docs.unrealengine.com/latest...nts/index.html

    The game mode blueprint just never receives input, it just flat out doesn't work on my end with what is posted there.

    Comment

    Working...
    X