Player spawns at wrong Player Start on Play
The above is my code that lies within the GameMode class in C++. GameInstance holds a persistent variable for choosing between which Player Start to choose. By default on creation, the value is true, so by the code above, the player SHOULD spawn at the Tutorial Player Start location on start of the game as shown below ![alt text]
[Tutorial Right Spawning Location]
but somehow, the player can still spawn at the 2nd of the 2 Player Starts, which is meant for player who wish to skip the tutorial. ![alt text]
The GameInstance variable, as stated, is set by default to true. The value changes within this menu widget which asks for yes or no if first time playing the game ![alt text]
however, the player still randomly spawns at one of the two player starts, on player start and through this widget. This is confusing me and I don't understand why.
Also, within that coded function for choosing player start, I have tried to flat out return NULL for the player start and it still randomly spawns at one of the two locations. The debug statements and the gameInstance variable value changes correctly, but the player start spawning is still randomized. Please, help is very much appreciated at this time.
Below for reference is how the player uses the logic to spawn. ![alt text]
IGNORE THIS QUESTION. PROBLEM HAS BEEN FIXED. See that Construction Script for the player? The connection from the function call to set actor location was incorrect. VERY INCORRECT. Should be connected to GetActorLocation.
answered May 31 '15 at 10:58 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here