Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 677 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 4 1 2 3 4
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
I
immolat3 Offline OP
Junior Member
immolat3  Offline OP
Junior Member
I

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] #167020
11/12/07 21:45
11/12/07 21:45
Joined: Nov 2007
Posts: 73
I
immolat3 Offline OP
Junior Member
immolat3  Offline OP
Junior Member
I

Joined: Nov 2007
Posts: 73
tried to test it with

plBiped01_entity.x = 100;
plBiped01_entity.y = 100;
plBiped01_entity.z = 100;

instead of any swapping, and it never moves me. soooo im assuming something is either wrong with if(you) or something else =x

Re: TelePort Gun (swapping X,Y,Z coords) need help [Re: immolat3] #167021
11/12/07 21:47
11/12/07 21:47
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
It's me = plBiped01_entity;

Re: TelePort Gun (swapping X,Y,Z coords) need help [Re: TWO] #167022
11/12/07 21:49
11/12/07 21:49
Joined: Nov 2007
Posts: 73
I
immolat3 Offline OP
Junior Member
immolat3  Offline OP
Junior Member
I

Joined: Nov 2007
Posts: 73
heh, had already done that before you said =p

still does nothing

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
I
immolat3 Offline OP
Junior Member
immolat3  Offline OP
Junior Member
I

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

Re: TelePort Gun (swapping X,Y,Z coords) need help [Re: immolat3] #167024
11/12/07 22:01
11/12/07 22:01
Joined: Nov 2007
Posts: 73
I
immolat3 Offline OP
Junior Member
immolat3  Offline OP
Junior Member
I

Joined: Nov 2007
Posts: 73
im pretty sure its just firing the trace the wrong way, is there a way to visualize the "laser" it shoots?

Re: TelePort Gun (swapping X,Y,Z coords) need help [Re: immolat3] #167025
11/12/07 22:05
11/12/07 22:05
Joined: Nov 2007
Posts: 73
I
immolat3 Offline OP
Junior Member
immolat3  Offline OP
Junior Member
I

Joined: Nov 2007
Posts: 73
Also, i can fake a teleport by just removing an entity if its hit and making a new one, i can already do both of those things the problem is just getting the x y z of any entity. sigh.

Re: TelePort Gun (swapping X,Y,Z coords) need help [Re: immolat3] #167026
11/12/07 22:10
11/12/07 22:10
Joined: Nov 2007
Posts: 73
I
immolat3 Offline OP
Junior Member
immolat3  Offline OP
Junior Member
I

Joined: Nov 2007
Posts: 73
ok so update, i put that in a while loop so it would stay up, and now it actually switches depending on what texture im looking at, and shows .mdl's if i target them, as well.

the problem is, its not based off my pan at all, its just based off of directly in front of the character.

Re: TelePort Gun (swapping X,Y,Z coords) need help [Re: immolat3] #167027
11/12/07 22:14
11/12/07 22:14
Joined: Nov 2007
Posts: 73
I
immolat3 Offline OP
Junior Member
immolat3  Offline OP
Junior Member
I

Joined: Nov 2007
Posts: 73
i guess what im saying is, is it possible to give all the objects i want a certain texture, then if i hit that texture it gets that things x,y,z and stores it somewhere>?

Re: TelePort Gun (swapping X,Y,Z coords) need help [Re: immolat3] #167028
11/12/07 22:58
11/12/07 22:58
Joined: Mar 2003
Posts: 4,264
Wellington
Nems Offline

.
Nems  Offline

.

Joined: Mar 2003
Posts: 4,264
Wellington
Yeah its possible but why not trace for the ent name instead of textures, might help a little as then you can controll the over use of textures.

Page 3 of 4 1 2 3 4

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1