2 Blueprint Communication and their Defaults

I have a Teleport system setup: an Origin and an End Location. When I set them up, I was able to port back and forth, but when I spawn them, they cannot recognize each other due to their Default being “None”

TeleportOriginBP

TeleportOriginDefault in Editor

Here is the Variable Setup

219868-teleportoriginvariable-endlocation.png

Rather baffling, considering I thought I just needed to EventTick the location of Blueprint(s) and then they would see each other, but it seems like they HAVE to be selected in the Editor?

I’ve done a lot of research, but nothing seems to be matching up; can someone point me in the right direction?

I come from Unity mainly, so this could be a novice issue from switch about a week ago :slight_smile:

Thanks!

When you get “none” it usually means it is simply not specified. You could try setting the end location actor on construction or begin play. Essentially it doesn’t know what BP you are looking to communicate with until you set it.

I hear you:

I’ll be spawning these Teleports, so:

Will ConstructionScript or BeginPlay only be able to see what is currently in the scene when I play, or will it update when the Teleports are spawned?

Begin play fires when game has begun play. Construction is for whenever the actor is constructed or spawned within the level. :]

Essentially, it is this: https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/BlueprintComms/index.html

Except, my selection doesn’t stay if I spawn the Teleporters

I believe I am updating this right? If I am, still no luck, and I also get “Blueprint Runtime Error: Accessed None from function:”

Event Tick will run teleport for every game tick. If desired to teleport roughly every frame then yes but the accessed none means its pulling ______ as target so you need to specify which one. In the guide they create a variable as type blueprint reference then compile and it should give you the same box to specify which BP you are targeting. I’m not sure of the purpose or how you intend it to work but the access none is most likely the culprit. What is the access none from End location?

You might put something to get actor location inside the BP of end location on construction so where ever you put it, it will get its location and store in vector variable to access later. Construction script is per actor (each object) so it fires when the carrier actor (the object) is spawned in the world/level. Begin play will fire when starting the game but sometimes it still requires an actor to be spawned in world.

Actor life cycle resource.

Also, you might put something to get actor location inside the BP of end location on construction so where ever you put it, it will get its location and store in vector variable to access later.

Aye, and that’s where I am scratching my head like a mad-man.

How this works
Player walks to up to the TeleportOrigin. Once F is pressed, the Player goes from the TeleportOrigin to the TeleportEndLocation. This can be done vice-versa, as well. These Teleporters will be spawned by the Player, so they get to choose where they’re placed. If there is a more consistent way to accomplish this, I am all ears :slight_smile:

Variables
EndLocation is a variable that is referenced by the TeleportEndLocationBP

219883-endlocationvariable.png

OriginLocation is a variable that is referenced by the TeleportOriginBP

219888-teleportoriginvariable.png

What I can do:
Set them in the Editor and it works on the Teleporters that are already placed in the level

What I can’t do, but need to:
Have them be set when they’re spawned, or dragged into the game.

Any chance I can get an example of this? I think you’re right, but I don’t know how to accomplish this =/

I did this on the EndLocation Construction Script

I believed I used it right here on the OriginTPBP

I didn’t Teleport, and I got a Blueprint Runtime Error again =/
I tested this by going back to the Editor and manually selecting the references again, and it worked… this can’t be this hard, right?

You should just need the get actor location if spawning this in but technically you should be able to use GetActorLocation on your End Cube and get the same result since its puling a vector. Can you provide a screenshot of your access nones?

Access None:

And just to be on the same page, here are screenshots of what I mean by having to “set” it in the Editor. Once I “set” these in the Editor, then this all works…

219891-tpendlocationeditorsettings.png

Might be a bit more complicated if you’ll end up with more than one teleport point which I’m assuming you will. You may need a way to add a number to their name or something when spawned or add the end locations to an index as they are spawned. Usually it is no issue pulling aspects from actors already placed in the world. What can be difficult while starting is having issues when actively placing new objects in the world.

Aye, I am only allowing one of each to ever be setup in the world (by the choice of the player, that is), just haven’t gotten to that part yet since this part doesn’t work :slight_smile:

Ok cool just need to address your access none then really.

Hmm, perhaps you can specify/set the class on spawn rather than get the vector. Also off End Location you could use get actor location, it will do the same thing. Its will not seem so difficult once you figure it out. Just takes some getting used to how to call what you want, stay vigilant.

You saying that telereporter are placable, on event of placing entry point, keep the refrence of spawned teleporter in some varable, then end point teleporter is placed set orgin varable in end point to teleporter you keeped in varable and in orgin teleporter (using the refrence you keeped) set the endpoint of newly placed end point teleporter.

You will need to implement this in player or inventory system whatever you use to palce those teleporters, it there role of that code to set them up in first place after they are palced.

gave you the Solution how to solve. I just want to add some Clarification why you can´t simply set the Refference in the BP defaults.

Its simply because your BP is a Template for a actuall instance you will Spawn at some Point in some Level. Thats also the reasson why you can´t assign anything in the defaults. Your BP does not know in what Level it will End up so you can´t just take Information out of some Level because that would result in a crash if you spawn it in another Level.

But once you place your Object inside a Level it knows where it got Spawned and what is around it. Then you can choose freely what you want to refference from the level since its all know at that Point.

If you Spawn via Script its the same thing. You don´t know in what Level you Spawn. So you have to keep track of your Spawned Objects and pass them to others Objects when needed.

Good Luck and have Fun =)

I totally understand where you’re coming from! I am having a hard time piecing it together in code, can you take a look at my screenshots and help me out?

From ThirdPersonCharacter: I was able to print out their locations when they spawned, how can I pass these through to my Teleporter BPs? I keep getting Access None still, but I have variables that are referencing ThirdPersonCharacter?

Lastly, and maybe this is what I am missing, do I need to do the actual Teleport action in the ThirdPersonCharacter Blueprint? Meaning, my Teleporter BluePrints are there to just spawn actors and add effects to them?

Thank you for this! I love to know the “whys”.

Unfortunately, I can’t seem to piece it together – I am rather rattled at the moment. I posted some more screen shots in 's answer above, if you don’t mind looking that over :slight_smile: