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 teleport between two meshes

Hi guys, im completly new to visual scripting.

The idea is to be able to place two different boxes in the level during runtime. By overlapping your pawn with a box, it should teleport the pawn to the other box, if both boxes exists in the level. So i thought i can do this by creating two different blueprints for each box. I tryed to create a "destination"-variable for each blueprint. So if both boxes in the level exists, i should automatically get a reference to my destination-variable for each box (box 1 should get a reference to box 2 and visa versa). How can i achive this? So i could easily work with the "Get Actor Location" Branch by pointing to the destination variable. Or has anyone another idea how i can achive a teleport between two boxes in a level? The hard thing for me here is, that the boxes are created during runtime and they are not yet created when the level is loaded (and should not thoo). Thank you for any advises! :)

Product Version: UE 4.13
Tags:
more ▼

asked Dec 04 '16 at 09:46 PM in Blueprint Scripting

avatar image

Laliluxx
1 2

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

1 answer: sort voted first

If you create the teleports at runtime, you get the references to them when you spawn/create them. You could temporarily store those teleport references as local variables and assign the destination variable on both of them once you've first created 2 teleports.

So, step 1: create teleports and store their refs into local variable etc. step 2: assign the cross references.

Alternatively, you could just poll the level for other actors of the class (https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/FindingActors/Blueprints/) and get the references that way. But this is a naive approach to solve the problem as it's slower and you already get the references when you create the teleports.

more ▼

answered Dec 04 '16 at 10:29 PM

avatar image

0lento
115 2 4 11

(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