Announcement

Collapse
No announcement yet.

Having Issues Casting a Controller

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

    Having Issues Casting a Controller

    Hey everyone, I have been folowing aong with wolfpack's UMG chat tutorials, but I have run into an issue where a cast from a PlayerController to my controller is failing. I have attached some screenshots showing my blueprint layout. LobbyController.png is showing the blueprint controller I am trying to cast to. LobbyDesign.png shows the layout of what I'm trying to make, and LobbyGraph.png shows the cast that is failing (the part surrounded by the red box).

    I did start with ShooterGame instead of an empty project, and I am using engine version 4.9.2. There was one step in the video where he went into the menu showed in Menu.png and changed the default PlayerController to his controller, but that option is grayed out for me. If someone could also explain what that menu does and how I might edit it, that would also be greatly appreciated.
    Attached Files

    #2
    In order to add the custom modes, you must first create a new Gamemode by either adding it as a new blueprint class, or the handy '+' icon that I'm hovering over in this image:
    http://puu.sh/mZ0DA/73d73683b9.png
    Marketplace code plugin: AesTargeting - Make your Actors targetable =)

    Comment


      #3
      A related question:
      How do you get the player index for a controller? I know you can retrieve a "player controller" reference, but how do you tie that in with the "get player controller at index" node? The "cast as controller" node is giving me weird errors (unexpected null references) i dont seem to be getting with the player index version.
      Need another dev on your UE4 project? Send me a shoutout and I'll lend a hand

      Comment

      Working...
      X