main local.origin local.destination local.teletype local.setsize1 local.setsize2 local.model local.scale: if(local.teletype == 1) { thread returntele local.origin local.destination local.setsize1 local.setsize2 local.model local.scale local.teletype = 0 } local.portlight = spawn script_model if(local.model == NIL) { local.portlight model "fx/corona_red.tik" } if(local.model != NIL) { local.portlight model local.model } local.portlight.origin = local.origin + ( 0 0 10 ) if(local.scale == NIL) { local.portlight.scale = 1.5 } if(local.scale != NIL) { local.portlight.scale = local.scale } local.portlight notsolid if(local.teletype == 2) { local.portlight hide } if(local.teletype != 2) { local.trig = spawn trigger_use } if(local.teletype == 2) { local.trig = spawn trigger_multiple } local.trig.origin = local.origin if(local.setsize1 == NIL || local.setsize2 == NIL) { local.trig setsize ( -10 -10 0 ) ( 10 10 10 ) } if(local.setsize1 != NIL && local.setsize2 != NIL) { local.trig setsize local.setsize1 local.setsize2 } local.trig waittill trigger local.player = parm.other if(local.teletype != 2) { local.player tele local.destination } if(local.teletype == 2) { local.player iprint "You fell under the map." local.player iprint "Teleporting to the surface." local.player respawn //destination } local.portlight remove local.trig remove wait 0.1 thread main local.origin local.destination local.teletype local.setsize1 local.setsize2 local.model local.scale end returntele local.origin local.destination local.teletype local.setsize1 local.setsize2 local.model local.scale: local.portlight = spawn script_model if(local.model == NIL) { local.portlight model "fx/corona_red.tik" } if(local.model != NIL) { local.portlight model local.model } local.portlight.origin = local.destination + ( 0 0 10 ) if(local.scale == NIL) { local.portlight.scale = 1.5 } if(local.scale != NIL) { local.portlight.scale = local.scale } local.portlight notsolid local.trig = spawn trigger_use local.trig.origin = local.destination if(local.setsize1 == NIL || local.setsize2 == NIL) { local.trig setsize ( -10 -10 0 ) ( 10 10 10 ) } if(local.setsize1 != NIL && local.setsize2 != NIL) { local.trig setsize local.setsize1 local.setsize2 } local.trig waittill trigger local.player = parm.other local.player tele local.origin local.portlight remove local.trig remove wait 0.1 thread returntele local.origin local.destination local.setsize1 local.setsize2 local.model local.scale end // all spawnflags triggers, func_crates, barrels, doors, and more in "entdefs.pk3" .cpp files (open w/ notepad). // Example: in "trigger.cpp", QUAKED trigger_multipleall (1 0 0) ? x x NOT_PLAYERS MONSTERS PROJECTILES x x DAMAGE, // after the "?", the "x"s and OPTIONS are the 8 spawnflags (can have more/less options): "multipleall (1 0 0 ) ? 1 2 4 8 16 32 64 128. // // SpawnFlags Option Description // 1 / // 2 / // 4 NOT_PLAYERS: the trigger does not respond to players // 8 MONSTERS: the trigger will respond to monsters (dogs, dog bites) // 16 PROJECTILES: the trigger will respond to projectiles (rockets flying thru, grenades thrown, etc.) // 32 / // 64 / // 128 DAMAGE: the trigger will only respond to bullets (and explosion damage from rockets, grenades, etc.) // // (add one or more together for multi-flags: 4 + 16 = 20, don't respond to players, but respond to projectiles) // can add 128 with other values, but 128's description says "only respond", thus only bullets will trigger the trigger. // // Example: local.trig = spawn trigger_use targetname "test" spawnflags 128