How do I warp a BP in different locations in a certain area?

I have an enemy that I would like to transport away from player, but if like him to be confined to a a specific amount of area. I figured a giant trigger box and some how he’s not a low we’d to leave it maybe? Even it he transports??

Basically he transport to a random location WITHIN a certain vector.

Does someone know a way I could do this???

Why not just SetActorLocation when enemy touches giant trigger box?

Set actor Obviously works yes but what tells enemy how far away it’s allowed to go? What tells it why random vector to warp to? What holds information for a vector field of final trigger box if that’s how it’s done?
It’s obviously much more than just set actor location.

Hi AttemptD,

You can set up something like this:

I have this set on overlap, but you can use any other trigger you want. You may also need to add another amount to Z value, depending on your environment and whether you want it to raise or lower in height. You will probably also need to do a check in location first to see if there’s anything already there, to avoid it teleporting into another Actor.

Hope that helps!

I hate to Take up time but thus is VERY interesting to me. I understand floor math at bottom…but what exactly is get class and node with template doing there? What is that exactly?
And could u tell me how to do a check to see if something is in way??
This is excellent. Thank you so much.

Get Class and == nodes are just a simple method to determine if what I’m overlapping is an Actor of a certain class. I set it up this way just for ease of testing. It’s taking Other Actor output from Overlap event, getting its Class, and then the == node checks to see if it’s a Teleportee (name of Blueprint class I created for thing I was moving around). If it is, and only if it is, it will teleport it.

best way to check for a collision is probably to do a quick Line Trace. Something like this:

To do it properly, you’ll need to subtract radius of collision capsule of your teleported object from Set Location result on a line trace Hit, otherwise it’ll stop halfway embedded in other Actor. This is basic setup, though.

Incredible. I’ll play with this and see what I can do!! Thank you so much!