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"

Game mode firing begin play early?

I'm creating a little mobile game which runs off dedicated servers. I'd assume beginplay is to fire when the game starts, but it's firing as soon as the level loads.

In the gamemode I've set it to delay start., yet it's still firing beginplay before anyone connects.

If I monitor the game state it shows waiting to start. Am I missing something in the event flow?

Even manually firing start game keeps it in waiting to start.

Product Version: UE 4.11
Tags:
more ▼

asked Aug 10 '16 at 11:36 PM in Blueprint Scripting

avatar image

Paratus
1 1 2 3

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

2 answers: sort voted first

Hi Paratus,

Shohei is correct. The Begin Play is run as soon as a blueprint has been created within the level/world, not when a game has "begun" per se. The MatchHasStarted functionality should be your best bet to determine what information is fired when the game actually begins. You can find more information on the gamemode here:

https://docs.unrealengine.com/latest/INT/Gameplay/Framework/GameMode/index.html

And the overall gameplay framework here:

https://docs.unrealengine.com/latest/INT/Gameplay/Framework/index.html

more ▼

answered Aug 11 '16 at 08:24 PM

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

Seems to be either by design or a bug, but GameMode fires beginplay early. Can use HandleMatchHasStarted instead.

more ▼

answered Aug 11 '16 at 01:08 AM

avatar image

Paratus
1 1 2 3

avatar image Shohei Aug 11 '16 at 03:29 AM

I believe you need to manually call HandleMatchHasStarted as you have discovered. This is generally done once your GameMode has determined that all players have connected. Since this isn't an automatic service I believe this is by design since "MatchHasStarted" doesn't necessarily mean OnBeginPlay for every game.

(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