Announcement
Collapse
No announcement yet.
cast to custom player state always fails??
Collapse
X
-
What bp is this called in and when?
It's possible depending on when and where it's called before it spawns the playerstate if above mentioned is set rightInphidel / Brian - Developer of Ultraball
http://www.ultraballgame.com
Don't shy away from bugs in your game. Don't play it as intended. Break your game so you can fix it!
Comment
-
Originally posted by Inph1del View PostWhat bp is this called in and when?
It's possible depending on when and where it's called before it spawns the playerstate if above mentioned is set right
It's called from inside my login widget blueprint. After player presses the login button. I'm copying the code across from my other project and it works fine there I just don't get what I have missed . The project was based from a c++ project but the player state I made comes from the blueprint menu would this make a difference ?Last edited by EniGmaa; 02-28-2017, 07:49 AM.
Comment
-
Might be wrong but don't you have to get PlayerState from GameState?
https://www.reddit.com/r/unrealengin...layer_clients/
https://answers.unrealengine.com/que...blueprint.html
Comment
-
Thanks but those are mixed messages half people saying it should work and half saying you have to use the array but this doesn't make sense because then you need to distinguish between which player controller and which player state between each one and also I used get controller in my other project and the cast doesn't fail so this is why I'm confused
Also the playerstate would return invalidLast edited by EniGmaa; 02-28-2017, 10:48 AM.
Comment
-
ok its definatly a bug just did the exact same setup in my other project and it works fine
inside widget
inside custom playerstate
and when i run the game and press the button it calls the custom function and prints the message
i guess umg in 4.14 is bugged will have to upgrade to 4.15
thanks anyway guys
Comment
Comment