Last active
December 28, 2015 20:19
-
-
Save nickarthur/7556808 to your computer and use it in GitHub Desktop.
spawn a teleporter at a detected user's position relative to a game object hosting this script. cloudparty CLOUDPARTY (relative spawning of objects)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function spawnTeleport(entFieldsData) { | |
error('Got ' + entFieldsData.display_name + '\'s position at ' + stringify(entFieldsData.pos, {newline: false, indent: false})); | |
vecPosWorldToRel(entFieldsData.pos); | |
vecAdd(entFieldsData.pos, []); | |
spawn({ | |
prefab: 'Timeout Prefab', | |
pos: entFieldsData.pos | |
}); | |
} | |
getEntFields({ | |
ent: racer, | |
fields: ['display_name','pos'], | |
callback: 'spawnTeleport' | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment