1 registered members (AndrewAMD),
677
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: TelePort Gun (swapping X,Y,Z coords) need help
[Re: immolat3]
#167019
11/12/07 21:38
11/12/07 21:38
|
Joined: Nov 2007
Posts: 73
immolat3
OP
Junior Member
|
OP
Junior Member
Joined: Nov 2007
Posts: 73
|
var TraceCoords[3];
function TeleportGun() { me = player; vec_set(TraceCoords.x, vector(10000, 0, 0)); //shoots 10000 quants vec_rotate(TraceCoords.x, plBiped01_entity.pan); //shoots in the direction of the player c_trace(plBiped01_entity.x, TraceCoords.x, ignore_me | ignore_passable | activate_shoot); if (you) { var tempX; var tempY; var tempZ; tempX = plBiped01_entity.x; tempY = plBiped01_entity.y; tempZ = plBiped01_entity.z; plBiped01_entity.x = TraceCoords.x; plBiped01_entity.y = TraceCoords.y; plBiped01_entity.z = TraceCoords.z; you.x = tempX; you.y = tempY; you.z = tempZ; } }
actually kind of works..well, it doesnt give me empty pointer errors, but also it doesnt teleport me at all, heh.
|
|
|
Re: TelePort Gun (swapping X,Y,Z coords) need help
[Re: immolat3]
#167023
11/12/07 21:56
11/12/07 21:56
|
Joined: Nov 2007
Posts: 73
immolat3
OP
Junior Member
|
OP
Junior Member
Joined: Nov 2007
Posts: 73
|
so i thought id test something, so i made a room with 4 different textures
c_trace(plBiped01_entity.x,target_pos.x,IGNORE_ME + SCAN_TEXTURE + USE_BOX); if(tex_name) // An entity was hit? { draw_text(tex_name,200,30,vector(100,100,255)); }
no matter what it shows up as the one under me. and as i said earlier the origin is in the middle of my character so that makes no sense heh
|
|
|
|