Hi all, happy new year!
I’m having some trouble trying to spawn a player in a very noddy little game I have here. I think what I have is kinda working, but the log is stating that it could spawn the player because of a collision at 0,0,0. That’s fine, I understand that, but what I’m struggling with is why it is trying to use 0,0,0 when I’m trying to get it to use the PlayerStart, which is at 0,0,100.
To explain a little further…
I have created a “master” map which is empty. When it starts a ui widget is loaded to display the main menu. Initially, you could see both the player and the ui widgets I’d added to the viewport which was really irritating. I spent far too much time trying to work out how “not” to show these, and in the end discovered that if I just destroy the actor for the player, the ui widgets go to, leaving a clean/tidy menu system.
I will confess to not being overly familiar with the maps/modes/ui stuff at the moment and struggle enormously with the barren/sparse ui documentation.
From the menu, when you then click play, the blueprint then uses “load stream level” to load in the “level1” sub level. there’s obviously no longer a player, because I destroyed them, so the plan was to just respawn the player, at which point I assumed the ui widgets would all re-appear and off we go.
I am really struggling with which nodes I need to do this… I am currently using “GetPlayerController” to then “FindPlayerStart”, then “GetActorTransform” before hooking that into a “SpawnActor”, selecting my player’s pawn, and finally using a “Possess”. I did also see that the GameMode has a “RestartPlayer” but the outcome of both approaches seems to be the same, e.g. the error about the collision at 0,0,0.
I’ve run a few Print nodes off of the initial process and the transform location for the GetPlayerStart is coming back as 0,0,0 which I think is the source of the issue. It feels as if this is just a default value that is being returned when it fails to find the actual player start, but I don’t know why it would be failing.
I note that I’ve not used the “Incoming Name” property, I have no idea what this is for. Feels like there is some kind of mapping missing between the player and playerstart, yet before I did the “destroy actor” thing to make the menu appear correctly, everything ran as it should, the player just spawned in the right place and everything was ok.
I’m losing sooo much time on this and going round and round in circles with OLD forum posts and OLD tutorials and sparse UE4 documentation, I’m a bit lost
If anyone could spare a few moments to help I would be very grateful, if you have an example of nodes you could pop up in a screenshot of how you do it that might help.
Thanks in advance and happy new year