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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Get Character Location in Level BP

Hello, I have two questions. I'm trying to get MYCharacters location from it's class BP and use that value in my level BP. I've tried various methods like the ones featured the in BP communications and Interface tutorials to no avail. Those tutorials reference blueprints placed in the level, while I just want to get a variable. When I use a object variable to reference my characters blueprint and take the variable from there, it doesn't load any values.

alt text

Secondly, I'm trying to use the "Get distance to" function in my level BP, to grab a distance between a target point and my characters location. Assuming I could get the character location info from my class BP, how can I plug that in to the "Get Distance to" function. Also I'm using the Third Person Template if that helps. I've been searching and watching videos on this subject for a couple of days now and I'm at my wits end.

Product Version: Not Selected
more ▼

asked Jul 05 '14 at 04:31 PM in Blueprint Scripting

avatar image

6 1 3 4

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

1 answer: sort voted first

How are you setting the MyCharVar? If you are just making it the Blueprint of your playercharacter it is looking at a blueprint but not the one that's working in the game.

if single player you can just use Get PlayerIndex 0 then from that use the GetActorLocation or plug that directly into the OtherActor on the GetDistanceTo.

For a networked game you will have to do a little more work to access a specific player.

more ▼

answered Jul 05 '14 at 05:27 PM

avatar image

1.2k 50 24 51

avatar image AcidRedux Jul 05 '14 at 06:07 PM

Thanks man, works great now!

avatar image mindfane Jul 05 '14 at 06:28 PM

@AcidRedux Don't forget to mark this as the correct answer. This will help users with similar query.

(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