3 registered members (Ayumi, Akow, AndrewAMD),
1,505
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: TelePort Gun (swapping X,Y,Z coords) need help
[Re: immolat3]
#167009
11/12/07 21:06
11/12/07 21:06
|
Joined: Nov 2007
Posts: 73
immolat3
OP
Junior Member
|
OP
Junior Member
Joined: Nov 2007
Posts: 73
|
function TeleportGun() { vec_set(TraceCoords.x, vector(10000, 0, 0)); //shoots 10000 quants vec_rotate(TraceCoords.x, player.pan); //shoots in the direction of the player c_trace(player.x, TraceCoords.x, ignore_me | ignore_passable | activate_shoot); if (you) { var tempX; var tempY; var tempZ; tempX = my.x; tempY = my.y; tempZ = my.z; my.x = TraceCoords.x; my.y = TraceCoords.y; my.z = TraceCoords.z; you.x = tempX; you.y = tempY; you.z = tempZ; } }
i tried to do the teleport in more steps thinking it might make it easier to see for myself, but this still gives me empty pointers
i switched it to camera.pan, player.pan, and my.pan all with the same results.
Also tried switching to camera.pan and making all the my.x and such to player.x
function TeleportGun() { vec_set(TraceCoords.x, vector(10000, 0, 0)); //shoots 10000 quants vec_rotate(TraceCoords.x, camera.pan); //shoots in the direction of the player c_trace(player.x, TraceCoords.x, ignore_me | ignore_passable | activate_shoot); if (you) { var tempX; var tempY; var tempZ; tempX = player.x; tempY = player.y; tempZ = player.z; player.x = TraceCoords.x; player.y = TraceCoords.y; player.z = TraceCoords.z; you.x = tempX; you.y = tempY; you.z = tempZ; } }
this gives mea different empty pointer, it says
c_trace(player.x, TraceCoords.x, ignore_me | ignore_passable | activate_shoot);
contains the empty pointer
Last edited by immolat3; 11/12/07 21:09.
|
|
|
Re: TelePort Gun (swapping X,Y,Z coords) need help
[Re: TWO]
#167011
11/12/07 21:20
11/12/07 21:20
|
Joined: Nov 2007
Posts: 73
immolat3
OP
Junior Member
|
OP
Junior Member
Joined: Nov 2007
Posts: 73
|
Tried that, same thing, empty pointer...
var TraceCoords;
function TeleportGun() { me = player; vec_set(TraceCoords.x, vector(10000, 0, 0)); //shoots 10000 quants vec_rotate(TraceCoords.x, player.pan); //shoots in the direction of the player c_trace(player.x, TraceCoords.x, ignore_me | ignore_passable | activate_shoot); if (you) { var tempX; var tempY; var tempZ; tempX = player.x; tempY = player.y; tempZ = player.z; player.x = TraceCoords.x; player.y = TraceCoords.y; player.z = TraceCoords.z; you.x = tempX; you.y = tempY; you.z = tempZ; } }
thats what i have, then in my input script i call TeleportGun(); obviouslly. That function is inside the actual player script, built off of the PlBiped01.wdl that comes with gamestudio a7.
vec_rotate(TraceCoords.x, player.pan);
^ that is the line causing problems at the moment.
btw, thanks so much for helping me. i appreciate it.
|
|
|
|