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"

Using Start Match from GameModeBase derived class


I've created a game mode which is derived from 'Game Mode Base' and I want to use the Match nodes from the parent 'Game Mode' class (I.e. Start Match, End Match etc). The problem is, Start Match requires a reference to a 'Game Mode Object' so it won't accept a reference to 'self', but if I try to cast my game mode to the parent 'Game Mode' class it fails. So I can't figure out how to set the target for Start Match/End Match.


Any help would be appreciated.


Product Version: UE 4.19
startmatch.png (143.1 kB)
more ▼

asked Jun 11 '18 at 09:34 PM in Blueprint Scripting

avatar image

13 1 5 8

avatar image mightyenigma Jun 11 '18 at 10:20 PM

you shoyldnt have to cast to the parent to access inherited functions. try it without casting

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

1 answer: sort voted first

If you want to use a function that resides in GameMode you need to inherit from GameMode instead of GameModeBase. GameModeBase doesn't have a function called StartMatch, it belongs to GameMode like the StartMatch node describes "Target is Game Mode". Your cast always fails because self (GameModeBase) does not inherit from GameMode.

more ▼

answered Jun 11 '18 at 10:45 PM

avatar image

936 3 4 8

avatar image Astaroth368 Jun 12 '18 at 07:00 PM

Thank you for the answer. I think I must have been tired and not concentrating, for some reason I had it in my head that GameModeBase was derived from GameMode (despite the fact that 'Base' kinda gives it away lol). I think what didn't help is I tried inheriting from GameMode and suddenly had weird spawning issues, but having read the documentation I've now realised I also need to change from GameStateBase to GameState which makes sense. All working now, thank you.

(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