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"

[Error] This blueprint(self) is not a ThirdPersonGameMode_C

I have the error that i dont know how to fix. Can you help me? On the first picture ThirdPersonCharacter. On the second ThirdPersonGameMode. The warning i know how to fix. alt text

alt text

Product Version: UE 4.18
Tags:
1.png (94.5 kB)
2.png (147.5 kB)
more ▼

asked Aug 28 '18 at 06:43 AM in Blueprint Scripting

avatar image

KyklsDro
9 2 1 5

avatar image Tuerer Aug 28 '18 at 07:00 AM

Are you casting the blueprint to itself? If so, you can just call the function you need without casting, it's already there in your BP.

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

I'm casting self (Character) to a player controller which is totally different, to fix the warning needs GetPlayerController > Cast to >> MyPlayerController. To fix the error needs Get Game Mode > Cast to ThirdPersonGameMode > the result of the cast is the target in your event with the error. Thanks, SenToRious.

more ▼

answered Aug 29 '18 at 08:06 AM

avatar image

KyklsDro
9 2 1 5

(comments are locked)
10|2000 characters needed characters left

You're not connecting the correct things to your function.

Use the GetGamemode Node for the top pin.

Use the GetController Node for the middle pin.

Use the Self Node for the bottom pin.

more ▼

answered Aug 28 '18 at 08:35 AM

avatar image

HarryHighDef
1.2k 1 12 16

avatar image KyklsDro Aug 28 '18 at 12:37 PM

Use the GetGamemode Node for the top pin.

It does not fit. ![alt text][1] [1]: /storage/temp/251808-3.png
3.png (482.9 kB)
(comments are locked)
10|2000 characters needed characters left

One error is because you are trying to cast a character to a controller. Casting only works on things that have the same class inheritance. So for example you can cast Animal to Dog, and Dog to Golden Retriever, and Animal to Golden Retriever, but you cannot cast Kitchen Appliance to any of the above.

If you want the controller of the Character then use the character's Get Controller node.

more ▼

answered Dec 06 '18 at 04:10 PM

avatar image

mightyenigma
3.4k 16 17 12

(comments are locked)
10|2000 characters needed characters left
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