Welcome to Open Carnage

A resource for Halo Custom Edition and MCC modding, with unique means of rewarding content creation and support. Have a wander to see why we're worth the time! - EST. 2012

Sign in to follow this  
Followers 0
Yellowstone

Player Teleport

Posted (edited)

Looking to see if I could use SAPP to teleport a player vs having them "die" when they fall into the bottom of a map..ie Boardingaction. When they fall in middle...vs immediate death the script would "teleport" them back to a specified location using x-y-z coordinates or some other means?

Edited by Yellowstone
wrong section can you move to "requests"

Share this post


Link to post
Share on other sites

Tiddy-bits:

I've made 3 scripts for 3 different use cases, every one of them requires that you put:

cheat_jetpack true

into your sapp init.txt, or you could toggle it using events.txt on the condition that the map boardingaction is loaded.

 

These scripts also require configuration, the coordinates that are included are only examples, so you will have to find where you want people to be teleported by using /coord from a sapp server to find the x,y,z coordinates.  The teleportation is triggered when a player goes below -5 in the z coordinate space.  I think the lowest point that you can walk on in boarding action is -4.78.  If you fall from level 5 in the map then the falling damage will kill you before you get to -4.78, thus the requirement of cheat_jetpack true. All the scripts will only teleport on the condition that the map boardingaction is loaded, if you run another map those won't be affected.  I didn't test this with antiglitch enabled, but it seems to work without antiglitch.

 

ba_no_fall.lua

One set location for players to be teleported to, doesn't matter what gametype or team or anything, everyone who falls off is teleported to that location.

 

ba_no_fall_multiple.lua

You can program in as many teleport locations you want, and one will be selected from the list using math.random() (randomly) for a player to teleport to.  However red and blue teams will share the same pool of teleports that can be chosen.

 

ba_no_fall_multiple_teams.lua

Red and blue teams both have a separate pool of random places that they teleport to after falling into the abyss, they have to be programmed in separate arrays of {x,y,z} coordinates, but it works the same as ba_no_fall_multiple.lua, only it has different teleports dedicated to each team.

 

Chalwk's github helped make these scripts possible, thanks!

ba_no_fall.lua

ba_no_fall_multiple.lua

ba_no_fall_multiple_teams.lua

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.