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"

[C++] How to implement BeginPlay on a gamemode.

Hi! I am trying to do something fairly simple: get my gamemode to "do stuff" on BeginPlay(). The thing is, I have failed to find any help on implementing it on anything but Actor & Pawn. Obviously simple "virtual void BeginPlay() override;" in the header file of GameMode won't work, so what will?

Thanks in advance!

Product Version: UE 4.8
Tags:
more ▼

asked Jun 24 '15 at 08:23 PM in C++ Programming

avatar image

DoctorPC
398 44 39 51

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

2 answers: sort voted first

Fixed already on the forums. I was getting error about unresolved externals, only to find out it is because you actually need to implement them in .cpp too :P

more ▼

answered Jun 25 '15 at 08:14 AM

avatar image

DoctorPC
398 44 39 51

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

Did you remember to setup Default GameMode?

Also remember Super::BeginPlay()


In the Editor:

Edit (Top left corner) -> Project Settings... -> Maps & Modes (under Project)

Under Default Modes setup:

Default GameMode

Global Default Server Game Mode (click on down arrow)

more ▼

answered Jun 25 '15 at 03:00 AM

avatar image

MiniTurtle
259 17 10 18

(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