Announcement

Collapse
No announcement yet.

Teleport a spawned object

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Teleport a spawned object

    Is there any way to do this preferably without using the level bp. The problems I'm encountering so far if I try and set it up using a level BP there is no way to ref the object I'm trying to spawn because it doesn't exist in world outliner just the BP that spawns it and all teleporting tutorials out there seem to be set up to teleport the player and not objects in the world. What I'm basically trying to do is create two teleport BP's that I can put into the level and have an object (Not the player) overlap with one BP and appear at the other.

    #2
    Yes, there are multiple methods for it.

    Easiest way: you make all that logic inside object that teleports, so it will teleport self.

    Then you have problem of telling object when to teleport.
    You can for eg get all actors of class (and your object class here) then tell it to teleport.
    Or you can make event dispatcher in player controller, then hook that dispatcher from every object class.

    easiest to use, but most advanced would be:
    create blueprintable componnent, in that component hook to dispatcher from player controller,
    when dispatcher is fired component teleports parent object.

    Also
    search for "blueprint communication" tutorials, they move trees up and down, its almost same as teleporting.

    Comment


      #3
      Ok so I tried the easiest method by putting it in the object its self but I am missing something here because its not working.
      Click image for larger version

Name:	Screen Shot 2016-04-15 at 2.56.12 p.m..png
Views:	1
Size:	107.1 KB
ID:	1104559

      The only way I can reference the teleport BP's is by using a cast to which is not working here.

      Comment


        #4
        Watch tutorials about blueprint communication, you need correct reference to your actor, not just any reference to any actor (like you did there).

        I could write you (or make picture) about what you need to do to get it working, but that is not the point. You need to learn what are references and how to use them. Best way is tutorials.

        I just did search and watched tutorial, it has exactly what you need.

        Comment


          #5
          Your right it would be better for me to understand the problem rather than being showed the solution. (Unless I still don't get it after watching the tutotials then I'll regret saying that LOL)

          Comment


            #6
            Ok so I think I'm nearly there I'm just stuck on the last part. So I have created the custom event in the ball and connected it to a teleport and ref teleport 1 BP to make the ball disappear when it overlaps teleport1 but I can't figure out a way to select teleport 2 as the destination. Below teleport 2 is a variable I created to reference the Teleport2 BP. What I have below doesn't work. So I don't know where the ball is going but it does disappear.
            Click image for larger version

Name:	teleball.JPG
Views:	1
Size:	139.7 KB
ID:	1104574

            Click image for larger version

Name:	Teleport1.JPG
Views:	1
Size:	90.6 KB
ID:	1104567
            Attached Files
            Last edited by tcla75; 04-15-2016, 02:25 PM.

            Comment


              #7
              Nope? No answer OK

              Comment

              Working...
              X