If a spawned actor calls the possessed node, is it the only current thing that can be used by that player controller?

If I am trying to make something akin to old arcade games. Then I want the gamepads for each respective player to be able to say press left special and insert a credit, and right special for that players start.

The only way I see to do this is in each of the respective game mode(s) that pertains to a certain map, lets say “title screen”. In the level have player starts according to the number of desired players.

Then in that game mode, off of an Event Begin Play, I get ALL actors of class, looking for player start. Fed to a For each loop, and out of the Array index to a “Create Player” node. And then that node is looking at the player starts and for each player start IF there is a gamepad plugged into the system with an assigned device ID. Then it seems Unreal (because the Spawn player controller box is checked) then assigns a player controller to each of those array index numbers (0,1,2,3,4)

Now, the only way I can figue with what I know to get the functionality of essentially the select and start buttons for the separate gamepads is to create dummy pawns to spawn in and then it doesn’t seem to be too difficult. This is of course also making sure to set the dummy pawns accordingly to the inputs.


You store your credits in the game instance obviously so that total exist between levels. After your character select screen is done and it is time for actual game play (ya know the glorious having a dummy run around a 25 X 25 room we see much of on Youtube).

When I spawn this game time level actor, IF the possess node is used then the actor is playable, and I am assuming control was just taken away from the dummy. But does that mean then when this playable character loses health and destroy actor is called then the dummy has to be repossessed?

I’m sorry I just can’t really understand the player controller system in Unreal. It seems way more complicated than it has to be. Why not just have “Device (s)” in Project Settings so if an when a device ID gamepad is hooked up its “left special” for example is unique from Device 01 and so on and so forth???

If you understand what I am talking about here and can think or suggest an easier and or better process here it would be appreciated, thanks.

Just so you know the Game Mode begin play executes before any players are even connected. The Level initiates the GM. GM inits the Game State. On player join the GM creates the controller and a Player state.

You can use On Post Login in the GM to generate a Unique ID for the joining player and Store that ID in an array in the GM. You can even pass that value to the Player State of the joining player.

0 -> 345ergm345tjdf
1 -> 58567346fghr56
2 -> 11flhdl42939tk5
etc

You can also create custom Spawn Zones/Actors and have the GM spawn the pawn directly to a specific zone/actor using the Index for matching ID. This is a trivial process at most. And it doesn’t require you to hack at any of the default core code.

2 Likes

Ok thanks Rev.

Guys I still need to know after I call unpossess on Player 00 when all lives are exhausted to repossess the dummy pawn so I can access its logic. Any help is appreciated.

What I ended up having to do was just respawn the dummy pawn once Player 00 lives were less than zero. Seems to be working ok. No idea why I couldn’t simply use those various possess nodes to do essentially the same thing.