Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Setting dynamic player start

Hey everyone!

I am working on a small project and wanted to set up my Player Start points to allow for two different teams and bots. I wanted specific Player Starts to spawn bots and then specific spawns for each team.

Does anyone know of a way to do this without using C++?


Product Version: UE 4.10
more ▼

asked Aug 11 '16 at 03:08 AM in Blueprint Scripting

avatar image

113 18 23 26

avatar image NoobsDeSroobs Aug 11 '16 at 03:48 AM

In order to do this you need to store every player start in an array and override a function.

Please refer to this excellent answer by another user. Remember to vote his answer up.

In your case you have to create some logic so that you know what playerstart to select in what condition. Enums or ints can be used for this. Even strings.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

The appropriate place that this is set is in AGameMode::ChoosePlayerStart_Implementation(AController* Player) (https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/AGameMode/ChoosePlayerStart/index.html). This is what you would need to override. It is marked as a BlueprintNativeEvent, so you should be able to implement it in your custom GameMode blueprint.

You would then create a new APlayerStart that is derived from the APlayerStart blueprint. In it you would have a variable that determines which team can spawn there. In your GameMode method described above, you would return the PlayerStart actor that corresponds with the appropriate team. You would get the list of PlayerStarts in the level by using the TActorIterator method (which is the GetAllActorsOfClass node).

more ▼

answered Aug 11 '16 at 03:13 AM

avatar image

1.2k 31 8 40

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question