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"

how to use spline that is located in another blueprint?

i need to use spline which is located in another blueprint. How can I do that? I m trying to do that using cast to but cast to doesnt work as i want.

Product Version: UE 4.17
Tags:
more ▼

asked Oct 05 '17 at 06:23 AM in Blueprint Scripting

avatar image

szyrian
9 2 5 7

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

3 answers: sort voted first

You need to provide more info. Are the objects placed in the level or spawned dynamically? Which blueprint is trying to communicate with one another?

Generally speaking, you need to obtain a reference to your object first, casting is not always necessary.

more ▼

answered Oct 05 '17 at 07:14 AM

avatar image

Everynone
13.7k 74 25 57

avatar image szyrian Oct 05 '17 at 07:45 AM

I have a blueprint (default pawn class) that is controlled by the player and it is moving ahead. Also i have another BP (pawn) that is placed in the level in the same position as starting place of the player and inside it has splines that i want to use to move my main character. You said that i need to obtain a reference to my first object. how can i do that?

avatar image Everynone Oct 05 '17 at 07:59 AM

Since you've put your Pawn in the level manually, open the LevelBlueprint and drag the reference to the graph. Here's some detailed step by step:

https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/Types/LevelBlueprint/

Does it help?

avatar image szyrian Oct 05 '17 at 08:31 AM

Unfortunately i can only create a reference on level blueprint but not in my character blueprint. How can i do that inside my character?

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

To cast you first need to have the reference of this pawn.

Here is a helpful page: https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/FindingActors/Blueprints/index.html

You can also have something like a seperate "Spline Manager" that you will add references to when spawning those spline-pawns, and then have it expose functions that do whataver you need to do with them, achieving nice Seperation Of Concerns.

more ▼

answered Oct 05 '17 at 11:50 AM

avatar image

jtarczykowski
25 1 4

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

You might try using a "Get All Actors of Class" in your pawn. You can search for your spline blueprint and find the right one to get your spline variable out of. (It's messy, but if there's only one in the level, just get index 0 out of the result of Get All Actors of Class)

more ▼

answered Oct 07 '17 at 01:53 AM

avatar image

Ecnassianer
151 4 10 11

(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