Jump to content

Player teleporting.


Go to solution Solved by mrwonko,

Recommended Posts

it is possible to teleport a player in another location of map with scripting?

I know is possible to make with trigger_teleport and targert_position, but i need that before the teleporting is played a sound and a camera fade.

so i make a script connected to a trigger multiple to change origin and angles of player but not work. and i tried using origin and angles of a ref_tag and not works, so i tried waypoint_navgoal and same, not work. when fade turn to 0, player is again in the place of activation o.o

 

//Generated by BehavEd

use ( "switch to Mind dome" );
set ( /*@SET_TYPES*/ "SET_PLAYER_LOCKED", /*@BOOL_TYPES*/ "true" );
sound ( /*@CHANNELS*/ CHAN_VOICE_GLOBAL, "sound/spectral/traslationmat.mp3" );
camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 1.000 1.000 1.000 >, 1.000, 3000 );
wait ( 3000.000 );
set ( /*@SET_TYPES*/ "SET_PLAYER_LOCKED", /*@BOOL_TYPES*/ "false" );
set ( /*@SET_TYPES*/ "SET_ORIGIN", $tag( "mind0", ORIGIN)$ );
set ( /*@SET_TYPES*/ "SET_ANGLES", $tag( "mind0", ANGLES)$ );
set ( /*@SET_TYPES*/ "SET_PLAYER_LOCKED", /*@BOOL_TYPES*/ "false" );
camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 0.000, < 0.000 0.000 0.000 >, 0.000, 0 );
Link to comment

I just tested it, both without and with "Affect Player", and doesn't seem to work. At first look, the script seems ok. It's possible that SET_ORIGIN is very selective about tagging an entity; the easiest way IMO is to manually set the destination coordinates and angles. As for the angles, you want to only set the Z value (the third one), to avoid having the player stuck in very weird positions.

Link to comment

@@mrwonko . yes, is affecting the player because is the player that trigger the multiple... is strange also that the trigger_multiple is deactivatyed after end of the script. i have setted wait to 1... mmm boh. o.o i know that the script work becuase making fading, sound and playerlocking movement corrects. so is just the SET_ORIGIN and SET_ANGLES

 

I just tested it, both without and with "Affect Player", and doesn't seem to work. At first look, the script seems ok. It's possible that SET_ORIGIN is very selective about tagging an entity; the easiest way IMO is to manually set the destination coordinates and angles. As for the angles, you want to only set the Z value (the third one), to avoid having the player stuck in very weird positions.

 

 

mmm, so i cannot use tagging indicator... wonderful. >_> okay i will try with manual origins \ angles argh! O.o i need to make 16 triggers like that. o.o

Link to comment

A target_scriptrunner will by default only execute once and needs a count of -1 to be re-usable. You also need to set the runonactivator flag or the script will run on the target_scriptrunner instead of the player.

Thanks  :) Yes, i make a Usescript with trigger_multiple. this even i try with the scriptrunner way :)

Link to comment

Okay peoples, it works!! Need a trigger_multiple with wait at 1 and playeronce spawnflag, a target_scriptrunner used by the trigger.

the scriptrunner need count -1 and usescript as value. now is perfect :)

this script simulate for a repear a shifting in spectral realm for bypass a wall. if someone played sr1, can know that in spectral walls and platforms are deformated and open hidden passages. :)

Thanks @@mrwonko!

Futuza likes this
Link to comment

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
×
×
  • Create New...