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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

GameMode construction script bug

Hi, Below is a very simple node graph inside the construction script of a game mode blueprint. In the select node there are 5 cars. I'm just telling the game to set the last car as default pawn for this game. Now here is the bug: This works in the editor, in play mode, but it does not work on the mac build. Anybody knows a workaround ? Thank you.

alt text

Product Version: Not Selected
Tags:
more ▼

asked Nov 14 '14 at 08:55 AM in Bug Reports

avatar image disabled_Titirez_5 Nov 14 '14 at 08:58 AM

Forgot to mention I am using mac version 4.5.1 of the editor.

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

2 answers: sort voted first

Hey Titirez5,

Which version of the editor are you using? There is a bug in 4.5.1 (UE-5465) that is causing the Construction Script in GameModes to not execute, so I guess you're using an earlier version?

In either case, a safer way of doing this would be to use a SpectatorPawn as the Default Pawn Class, and then spawn and possess the pawn on Begin Play.

more ▼

answered Nov 14 '14 at 03:36 PM

avatar image disabled_Titirez_5 Nov 14 '14 at 04:20 PM

Hi Ben, I am using 4.5.1. I will use your suggestion with SpectatorPawn. Thank you.

avatar image Ben Halliday STAFF Nov 14 '14 at 04:28 PM

Happy to help. I will let you know when I see any updates on that bug.

You mentioned that this was working when you played in Editor, but I'm not sure how. Was your GameMode already set with the last car type as its Default Pawn Class? When I tried this same setup, it always returned the value set in the GameMode defaults.

avatar image disabled_Titirez_5 Nov 14 '14 at 06:49 PM

The value of the "index" pin from the "Select" node was something the player selected from a menu, I just used 4 here for simplicity. And yes, while in the editor play mode, this logic was working. In the GameMode defaults, the first car was set as default pawn. This was useful for when I wanted to skip the menu scene. But it always changed (in the editor play mode) when I selected something else from the menu. I'm not sure either. :)

avatar image Ben Halliday STAFF Nov 14 '14 at 06:59 PM

Hm. So when you set this value via your Menu, you then opened a new level with the same GameMode? If so, did you pass the new level any commands?

avatar image disabled_Titirez_5 Nov 14 '14 at 07:39 PM

I open a new level with a different GameMode. No commands, the "index" parameter is passed using a "Save game to slot" node.

avatar image Ben Halliday STAFF Nov 14 '14 at 07:58 PM

Interesting. I'll keep digging into the issue, and let you know what we find. Thanks for the extra info!

avatar image Nomte Dec 07 '14 at 11:30 PM

The user Eros has made a similiar question about the Construction Script bug, but he has noticed that the Construction Script of the GameMode is correctly executed when play in "Mobile Preview" or "Standalone Game". https://answers.unrealengine.com/questions/143433/gamemode-construction-script-not-invoke-in-46-when.html This drove me crazy for a few days following a tutorial made in version 4.4 hehehe. Thanks!

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

I got the same problem in 4.6.1. I don't know what should I do.

more ▼

answered Dec 24 '14 at 03:31 PM

avatar image

Henry Read
113 12 14 25

avatar image Ben Halliday STAFF Dec 24 '14 at 03:41 PM

Hi Henry,

This bug is still being investigated, so for now it would be safer to let the game spawn your default pawn class and then possess the desired pawn at Begin Play. If you use the Spectator Pawn as your default pawn class, you won't need to worry about spawning a visible pawn before possessing the new pawn.

avatar image theonecalledtom Jan 06 '15 at 08:44 PM

I don't know if this is related but I've just ported my project from Win64 to iOS and while it launches fine on the MAC it seems to run the wrong game mode (the default one) on the iPhone.

avatar image Ben Halliday STAFF Jan 06 '15 at 08:49 PM

That sounds unrelated to me. Please open a new post with as many details as you can give us and we'll look into it. Thanks!

avatar image theonecalledtom Jan 06 '15 at 10:37 PM

It was unrelated, and untrue, now I enabled breakpoints I see my code is running but my data isn't loading, as it's loose data in the content directory my guess is I need to make sure it is explicitly packaged somewhere. On-wards and upwards along the learning curve!

(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