x

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"

How to Select Which PlayerStart to Spawn?

Hello. I want to select which playerstart to spawn character there. For example; when the game first starts, character needs to start on PlayerStart1, when he come back from another level, it needs to start on PlayerStart2.

I tried to SpawnActorFromClass but it spawns another actor with my character. I just want character to spawn on points I want.

Product Version: UE 4.10
Tags:
more ▼

asked Aug 08 '16 at 08:34 PM in Blueprint Scripting

avatar image

w0hoho
125 23 26 37

avatar image Moynzy Aug 09 '16 at 08:42 AM

Hi, just get the transform of the player start. You know how a player start has a tag? just give the tag a value. So like the first player start will have value first, then the second player tag will have value second.

Then in your blueprint, loop through all the player starts in the world, and compare the tag in your logic.

Get the transform, and spawn the player on it.

avatar image w0hoho Aug 09 '16 at 10:40 AM

My game is not multiplayer, so there are not 2 players. I just want to spawn the only character in PlayerStart1 at first, then at some point of the game in PlayerStart2.

avatar image NoobsDeSroobs Aug 09 '16 at 01:26 PM

I answered witha way to do this.

avatar image w0hoho Aug 09 '16 at 02:14 PM

That couldn't help me, I can't make it work.

avatar image NoobsDeSroobs Aug 09 '16 at 02:15 PM

Then show me what you are doing because I know it DOES work if done correctly. How is your levels set up? What is the information flow? Screenshots, code. We need info. Your game is a black box to us so you have to give us info.

avatar image w0hoho Aug 09 '16 at 02:17 PM

I want to know how can I select 1 character spawn different PlayerStarts at EventBeginPlay node. It is single player game, it does not have two or more teams.

avatar image NoobsDeSroobs Aug 09 '16 at 02:18 PM

And I gave you an answer that does that. You then say it does not work, so you have to show me what you did so that we can find what you did wrong.

avatar image w0hoho Aug 09 '16 at 02:29 PM

I couldn't do anything with that solution.

avatar image w0hoho Aug 11 '16 at 08:08 PM

Can anyone help?

avatar image kai39 Nov 11 '17 at 02:35 PM

really dude? His answer is correct. If someone ask you about more information then just give them it. There is sadly no easy way for this. I am researching this for 4 weeks and working with arrays seems to be the only way outside of having 2 multiplayer caracters or somehow giving them tags...

avatar image w0hoho Nov 11 '17 at 02:50 PM

I managed to do this without playerstart but with spawn actor node.

It's been a while since I post it, so I don't remember exactly what situation I was in. I was new to the engine back then, I didn't know complicated things. I'm sorry if I did anything wrong.

avatar image kai39 Nov 11 '17 at 10:39 PM

Awesome! How did you do it with spawn actor nodes? Did you also use tags or how did you manage to do this. Also thanks for responding so quickly.

avatar image w0hoho Nov 12 '17 at 07:12 AM

I stored a transform variable to save it later. When player reaches some checkpoint, I updated that variable. When the game starts, on EventBegin there is a spawnActor node with that variable on the transform.

There is no playerStart on the level and because of that there will a character on your camera location when you start. So, be careful with that when you use this method.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Aug 08 '16 at 09:11 PM

avatar image

NoobsDeSroobs
2.7k 106 34 176

(comments are locked)
10|2000 characters needed characters left
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