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 play start from anywhere of the map

it seem that i can override some function of GameMode, but i don't know very clearly about the workflow, as when and how to set up the playerStart actor or regist it?so could you help me about this? thank you for your help.

Product Version: Not Selected
Tags:
more ▼

asked May 11 '15 at 01:42 AM in C++ Programming

avatar image

fvvf
1 2 2

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

4 answers: sort voted first

You just drag player start where you want to start playing your game when you click play < that is the answer if i understood your question correctly

more ▼

answered May 11 '15 at 06:49 AM

avatar image

wmbuRn
324 44 41 59

avatar image fvvf May 11 '15 at 10:18 AM

oh,it seem to be some mistake beacause of my pool English. i mean to regist the playerstart in runtime,depends on location data.- -

avatar image wmbuRn May 12 '15 at 07:18 AM

my bad, sorry (:

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

Hello, fvvf

Please note that you can spawn Player Start just like any other actor:

 MyPlayerStart = (APlayerStart*)GetWorld()->SpawnActor(APlayerStart::StaticClass(), &Location);

Player Start can be registered in your Game Mode class with AddPlayerStart() function:

 AddPlayerStart (APlayerStart * NewPlayerStart)

If you like to learn more about Player Controller in Unreal Engine 4, please go here: https://docs.unrealengine.com/latest/INT/Engine/Actors/PlayerStart/index.html https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/APlayerStart/index.html

Hope this helped! Cheers!

more ▼

answered May 11 '15 at 06:58 AM

avatar image

Andrii Melnyk
1.8k 60 19 112

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

thanks for your help,but i have annother question : where to regist it so that it won't cause no playerStart when open the level. For example, I register it on the GameMode Constructor,the Constructor recive a Location parameter, and the levels use this GameMode,is it right?

more ▼

answered May 11 '15 at 10:29 AM

avatar image

fvvf
1 2 2

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

You can register Player Start in constructor; however, you should spawn it in different place, since calling GetWorld(), which is needed for spawning, won't return correct value in constructor. GameMode class will try to choose the best PlayerStart to spawn your player, which will be determined with FindPlayerStart() and ChoosePlayerStart() functions. In default behavior, which can be overriden in C++, PlayerStart is chosen so that the player can fit in.

more ▼

answered May 11 '15 at 11:13 AM

avatar image

Andrii Melnyk
1.8k 60 19 112

(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