2 registered members (AndrewAMD, alibaba),
1,426
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: TelePort Gun (swapping X,Y,Z coords) need help
[Re: immolat3]
#167000
11/12/07 08:33
11/12/07 08:33
|
Joined: Aug 2003
Posts: 7,439 Red Dwarf
Michael_Schwarz
Senior Expert
|
Senior Expert
Joined: Aug 2003
Posts: 7,439
Red Dwarf
|
the best way would be to describe what problems EXACTLY you have with c_trace...
"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
|
|
|
Re: TelePort Gun (swapping X,Y,Z coords) need help
[Re: immolat3]
#167002
11/12/07 19:45
11/12/07 19:45
|
Joined: Mar 2005
Posts: 84 The Sacred Silence and Sleep
Spectre
Junior Member
|
Junior Member
Joined: Mar 2005
Posts: 84
The Sacred Silence and Sleep
|
If I were making such a weapon, I'd use entities and then use WED to make the objects SKILLn (where 'n' is whatever skill number you want) 9. (also arbitrary). Then, I'd use c_trace (as I said before, use AUM 59 for reference) to trace from the weapon to 10000 quants forward. If the ray hits an object and you.skilln == 9 (i.e. a vase you placed on the floor and set its skilln to 9), store the objects position in a variable, store the players current position in a variable, then swap them. Sure its a little more complicated than that, and if I coded it I imagine it would take me the better part of a day (so I won't ) Sorry I can't be of more help.
|
|
|
Re: TelePort Gun (swapping X,Y,Z coords) need help
[Re: Spectre]
#167005
11/12/07 20:38
11/12/07 20:38
|
Joined: Mar 2005
Posts: 84 The Sacred Silence and Sleep
Spectre
Junior Member
|
Junior Member
Joined: Mar 2005
Posts: 84
The Sacred Silence and Sleep
|
Here, this may help (I took the idea from AUM 59 for you) Code:
var TraceCoords;
on_mouse_left=TeleportGun();
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.skilln==9) { ...put teleport stuff here } } Now that is the general idea, and I *think* it may work but I didn't test it because I just don't have time (and obviously there is no teleport code there ) Good luck.
|
|
|
Re: TelePort Gun (swapping X,Y,Z coords) need help
[Re: immolat3]
#167008
11/12/07 20:56
11/12/07 20:56
|
Joined: Nov 2007
Posts: 73
immolat3
OP
Junior Member
|
OP
Junior Member
Joined: Nov 2007
Posts: 73
|
and when i use your code i get a overun error because of skilln==9
and i did set the flags to that on the object, so im not sure why
Last edited by immolat3; 11/12/07 20:59.
|
|
|
|