bl2sdk_Mods icon indicating copy to clipboard operation
bl2sdk_Mods copied to clipboard

Better Spawns and Better Travel (BSABT) - here is the code to add teleport to any thing in the map

Open djoole opened this issue 1 year ago • 2 comments

Hi,

I wanted to be able to fast travel/teleport to any point in the map. I couldn't get to find the code to teleport to the custom marker, but I could find the code to teleport to any interest point in the map (like O2 cracks for instance).

If anyone is interested, you need to add this code in travel.py after line 44 :

                elif "willowinteractiveobject" in bl2tools.get_obj_path_name(self.MapObjects[temp]).lower():
                    dest_loc = self.MapObjects[temp]
                    pawn.Location = (dest_loc.Location.X, dest_loc.Location.Y, dest_loc.Location.Z + 50)
                    pawn.Controller.Rotation = (dest_loc.Rotation.Pitch, dest_loc.Rotation.Yaw, dest_loc.Rotation.Roll)

djoole avatar Dec 31 '24 19:12 djoole

To make it work with O2 stations, you have to raise the added height a bit, otherwise you get stuck in it : dest_loc.Location.Z + 300

djoole avatar Jan 01 '25 15:01 djoole

Hi,

I wanted to be able to fast travel/teleport to any point in the map. I couldn't get to find the code to teleport to the custom marker, but I could find the code to teleport to any interest point in the map (like O2 cracks for instance).

If anyone is interested, you need to add this code in travel.py after line 44 :

                elif "willowinteractiveobject" in bl2tools.get_obj_path_name(self.MapObjects[temp]).lower():
                    dest_loc = self.MapObjects[temp]
                    pawn.Location = (dest_loc.Location.X, dest_loc.Location.Y, dest_loc.Location.Z + 50)
                    pawn.Controller.Rotation = (dest_loc.Rotation.Pitch, dest_loc.Rotation.Yaw, dest_loc.Rotation.Roll)

This works for me, thanks.

AlfonsoG-dev avatar May 13 '25 04:05 AlfonsoG-dev