Spawn at different playerstart after level restart?
Lets say I have 2 PlayerStarts in different sublevels. The first one is where the player start at the beginning of the game. The second PlayerStart is in a different sublevel, and this is where I want the player to spawn after he is killed.
I have referenced the PlayerStart in the Character BP, so the respawn location is at the PlayerStart. But the player spawns at the first PlayerStart. How would I go about selecting the correct PlayerStart by tag?
The original plan was using a checkpoint system. I created a simple checkpoint system. So when the player dies he spawns at the last checkpoint. But this dont work since I need to restart the level for everything to reset.
I used OpenLevel to restart the game and that resets everything. The thing is that the player checkpoint is in a sublevel and the checkpoint dont work when using OpenLevel to reset.
Hope this makes any sense?
asked Oct 26 '16 at 12:53 PM in Blueprint Scripting
I don't have much idea about sublevel and level streaming but :
Maybe when 'get all actors of class' node is runs, it will return only references of objects loaded sublevel and not those who are unloaded in a specific sublevel
Hope it helps
answered Oct 26 '16 at 01:44 PM
The choice of the spawn point is managed by your game mode, to manually select which spawn point to use, you need to override the ChoosePlayerStart Function, here's an example:
answered Oct 26 '16 at 02:09 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here