-
Notifications
You must be signed in to change notification settings - Fork 1
Random Spawnpoint at Level Start
JammieDodgerr edited this page Jan 11, 2023
·
1 revision
Add multiple Player Start
actors to your level in different locations.
Open your Level Blueprint and add a Get All Actors Of Class
node, connect it to Event BeginPlay
.
In the Actor Class
dropdown, select PlayerStart
. Right click on Out Actors
and Promote to Variable
.
Attach the Out Actors
Set output to a Length
array node and a Get (A Copy)
node. Add a Random Integer
between the Length
and Get (A Copy)
nodes.
Attach the Get (A Copy)
node to a Restart Player at Player Start
node and attach the Exec white line.
Attach Get Game Mode
and Get Player Controller
nodes to the Restart Player at Player Start
.