1 registered members (TipmyPip),
18,619
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: c_trace problems
[Re: nigel]
#282019
07/29/09 22:19
07/29/09 22:19
|
Joined: May 2004
Posts: 1,510 Denmark
Claus_N
Serious User
|
Serious User
Joined: May 2004
Posts: 1,510
Denmark
|
1) result = c_trace(my.x,vector(my.x,my.y,my.z-5000),IGNORE_ME | IGNORE_PASSABLE | USE_BOX); my.z -= result * (result > 0); 2) Use "target" instead of "hit" I hope it helped 
Last edited by Claus_N; 07/29/09 22:22.
|
|
|
Re: c_trace problems
[Re: Claus_N]
#282020
07/29/09 22:22
07/29/09 22:22
|
Joined: Feb 2009
Posts: 3,207 Germany, Magdeburg
Rei_Ayanami
Expert
|
Expert
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
|
@ Claus_n: 1) this works? you made something wrong  - You should not make my.z -= downdistance - becuase it´s wrong xD - use my.z = -downdistance * time_step -there is a differetn
|
|
|
Re: c_trace problems
[Re: nigel]
#282021
07/29/09 22:22
07/29/09 22:22
|
Joined: Jul 2005
Posts: 1,002 Trier, Deutschland
Nowherebrain
Serious User
|
Serious User
Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
|
for falling etc...
var ground_dist;
var fall_limit = 1000;
ground_dist = c_trace(my.x,vector(my.x,my.y,(my.z - fall_limit)),IGNORE_ME|IGNORE_PASSABLE);
if(ground_dist > 5)//adjust if needed
{
player.z -= 100 * time_step;//falling, adjust as well.
}
///stick to ground
VECTOR temp;
vec_set(temp,my.x);
temp.z -= 1000;
c_trace(my.x,temp,IGNORE_ME|IGNORE_PASSABLE);
if(trace_hit)
{
vec_set(my.x,hit.x);
}
|
|
|
Re: c_trace problems
[Re: nigel]
#282022
07/29/09 22:22
07/29/09 22:22
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
1> downdistance = c_trace(my.x,vector(my.x,my.y,my.z-5000),IGNORE_ME | IGNORE_PASSABLE | USE_BOX); my.z -= downdistance;
2> "hit" is only valid in lite-c, and from version A7.08 onwards.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: c_trace problems
[Re: Nowherebrain]
#282023
07/29/09 22:24
07/29/09 22:24
|
Joined: May 2004
Posts: 1,510 Denmark
Claus_N
Serious User
|
Serious User
Joined: May 2004
Posts: 1,510
Denmark
|
@ Claus_n: 1) this works? You probably saw what I wrote before I edited it. I was just a bit too fast (might have been thinking of ent_animate as I've just been using that) 
Last edited by Claus_N; 07/29/09 22:24.
|
|
|
|