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"

"Object" Pin when Casting to Actor

So, I have been using this Endless Runner Tutorial, only I am using an actor called "Blueprint_CourseSpawner" instead of the game mode to hold the script that spawns the course. The only problem is, in the lesson he plugs "Get Game Mode" into the casting node. That obviously won't work for me. What should I do instead?

I had the link start the video where he does this step of the tutorial.

alt text

Product Version: UE 4.12
Tags:
2016-07-26 (2).png (777.8 kB)
more ▼

asked Jul 26 '16 at 10:36 AM in Blueprint Scripting

avatar image

Mx Tekuno
15 4 6 6

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

1 answer: sort voted first

Hi there, deleted my previous answer, because i failed at understanding.

You are confusing the GameMode cast with your Blueprint_CourseSpawner cast. You will have 3 Casts-Nodes other than in the tutorial.

So just create the GetGameMode node and drag the cast node as shown in the video. And put this node before your Blueprint_CourseSpawner cast node. And you should be good to go :)

hope that helps :) Marooney

more ▼

answered Jul 26 '16 at 10:54 AM

avatar image

Marooney
891 36 8 37

avatar image Marooney Jul 26 '16 at 11:03 AM

Ok, I see, you are actually struggling to get your CourseSpawner. Is your CourseSpawner an Actor within the level? So I can provide you with an sample how to access it, if this is not covered by the tutorial.

avatar image Mx Tekuno Jul 26 '16 at 11:32 AM

The Course Spawner is a blueprint I set up as an actor and placed in the world at 0,0,0. Other than that my steps were identical to the video.

I also tested the solution in the first answer, but it didn't change anything.

avatar image Marooney Jul 26 '16 at 02:31 PM

Ok so here we go: At first you need to create the a Variable for your CourseSpawner in your GameMode like this: alt text

Then you need to tell the GameMode about the CourseSpawner you have placed in the level. The LevelBlueprint is the only place for now, who knows about that Actor, so here we go: alt text

So now your GameMode knows about your CourseSpawner as well, you can finally access your Actor within the Placeholder_CourseTile_... Blueprint :) Just make sure to cast to your GameMode and not to your CourseSpawner. alt text

You should be good to go now :)

hope that helps :) Marooney

avatar image Mx Tekuno Jul 27 '16 at 06:07 AM

It's working! Thanks a bunch. ^u^

(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