|
|
Re: And again one of my simple questions C_TRACE
[Re: rayp]
#237427
11/20/08 03:12
11/20/08 03:12
|
Joined: Jul 2008
Posts: 2,107 Germany
rayp
OP
 
X
|
OP
 
X
Joined: Jul 2008
Posts: 2,107
Germany
|
Damn! The code dont works right! Sometimes its correct, sometimes not when ill change it to
..
vec_rotate(temp, camera.pan);
c_trace (player.x,temp2,IGNORE_ME|IGNORE_PASSABLE|ACTIVATE_SHOOT);
..
the trace shots in the floor i think my prob is that the trace hits the player model ! how can i mod the start point of c_trace to a few quants in front of the player model ? Im really not good with vectors 
Last edited by rayp; 11/20/08 03:31.
Acknex umgibt uns...zwischen Dir, mir, dem Stein dort... "Hey Griswold ... where u gonna put a tree that big ?" 1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected rayp.flags |= UNTOUCHABLE;
|
|
|
Re: And again one of my simple questions C_TRACE
[Re: rayp]
#237430
11/20/08 03:35
11/20/08 03:35
|
Joined: Aug 2008
Posts: 218 U.S.
GamerX
Member
|
Member
Joined: Aug 2008
Posts: 218
U.S.
|
You could just try c_trace (player.x + 5,temp2,IGNORE_ME|IGNORE_PASSABLE|ACTIVATE_SHOOT);
not sure if it will work but you can also try adding ignore_you or ignore_flag 2 and setting the flag 2 of the player or setting you to the player.
i would also try maybe using an empty entity instead of temp just to give it a try.
Last edited by GamerX; 11/20/08 03:38.
"You may never know what results come of your action, but if you do nothing there will be no result." -Mahatma Gandhi
|
|
|
Re: And again one of my simple questions C_TRACE
[Re: rayp]
#237432
11/20/08 03:54
11/20/08 03:54
|
Joined: Aug 2008
Posts: 218 U.S.
GamerX
Member
|
Member
Joined: Aug 2008
Posts: 218
U.S.
|
I could probably make a sample level for you with a sample script but im not sure if you would want it since it would be in lite-c and would be different than what you want in c-script.
"You may never know what results come of your action, but if you do nothing there will be no result." -Mahatma Gandhi
|
|
|
Re: And again one of my simple questions C_TRACE
[Re: GamerX]
#237433
11/20/08 04:02
11/20/08 04:02
|
Joined: Jul 2008
Posts: 2,107 Germany
rayp
OP
 
X
|
OP
 
X
Joined: Jul 2008
Posts: 2,107
Germany
|
it would be nice. I really dont know why my code dont work...in some directions it works fine...in others not  ...the prob is getting the trace target to the crosshair. The trace seams not correct oriented...
Last edited by rayp; 11/20/08 04:04.
Acknex umgibt uns...zwischen Dir, mir, dem Stein dort... "Hey Griswold ... where u gonna put a tree that big ?" 1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected rayp.flags |= UNTOUCHABLE;
|
|
|
Re: And again one of my simple questions C_TRACE
[Re: rayp]
#237434
11/20/08 04:12
11/20/08 04:12
|
Joined: Aug 2008
Posts: 218 U.S.
GamerX
Member
|
Member
Joined: Aug 2008
Posts: 218
U.S.
|
Ok basically i just made a character stand in the center and trace in front of him 5000 quants. Is that what you want or do you want more?
"You may never know what results come of your action, but if you do nothing there will be no result." -Mahatma Gandhi
|
|
|
Re: And again one of my simple questions C_TRACE
[Re: rayp]
#237436
11/20/08 04:21
11/20/08 04:21
|
Joined: Aug 2008
Posts: 218 U.S.
GamerX
Member
|
Member
Joined: Aug 2008
Posts: 218
U.S.
|
O well i put it in first because i don't have a 3rd person script that works with lite-c. But It will work with 3rd person if you just change the camera.x to my.x or player.x w/e. Yes it turn with it. Here Any probs with it hold on ill be back in like 10 min. Got to do somthing.
Last edited by GamerX; 11/20/08 04:23.
"You may never know what results come of your action, but if you do nothing there will be no result." -Mahatma Gandhi
|
|
|
Re: And again one of my simple questions C_TRACE
[Re: GamerX]
#237437
11/20/08 04:23
11/20/08 04:23
|
Joined: Jul 2008
Posts: 2,107 Germany
rayp
OP
 
X
|
OP
 
X
Joined: Jul 2008
Posts: 2,107
Germany
|
thanx again for quick help...
ACTION __Main_Gun_Fire {
var trace_target[3];
vec_set(trace_target,vector(5000,0,0)); // the weapon has a firing range of 5000 quants
vec_rotate(trace_target, camera.pan);
c_trace (camera.x,trace_target,IGNORE_ME|IGNORE_PASSABLE);
draw_point3d(target,vector(50,50,255),100,3);
#c_trace (camera.x,temp,IGNORE_ME|IGNORE_PASSABLE|IGNORE_MODELS|ACTIVATE_SHOOT);
#draw_point3d(target,vector(50,50,255),100,3);
}
on_mouse_left __Main_Gun_Fire;
same as before...the drawed point is only in some directions in the middle of the screen. i just cant believe this
Last edited by rayp; 11/20/08 04:30.
Acknex umgibt uns...zwischen Dir, mir, dem Stein dort... "Hey Griswold ... where u gonna put a tree that big ?" 1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected rayp.flags |= UNTOUCHABLE;
|
|
|
Re: And again one of my simple questions C_TRACE
[Re: rayp]
#237439
11/20/08 04:39
11/20/08 04:39
|
Joined: Aug 2008
Posts: 218 U.S.
GamerX
Member
|
Member
Joined: Aug 2008
Posts: 218
U.S.
|
Did you run the lite-c script? Was it in the middle then at all times.
May i ask why your using c-script instead of lite-c? Just curious.
Last edited by GamerX; 11/20/08 04:41.
"You may never know what results come of your action, but if you do nothing there will be no result." -Mahatma Gandhi
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|