Traceline Questions
Moderator: InsideQC Admins
5 posts
• Page 1 of 1
Traceline Questions
Hello all!
I'm playing around with traceline and am trying to figure out what trace_allsolid and trace_startsolid are and how they are used.
So far all I can determine about trace_allsolid and trace_startsolid is that both will return a 1 when ever the starting point of a traceline touches a solid. They seem to act exactly alike.
What is the difference between trace_allsolid and trace_startsolid?
Are they able give more info... other than a 1 or 0?
Thanks!!
I'm playing around with traceline and am trying to figure out what trace_allsolid and trace_startsolid are and how they are used.
So far all I can determine about trace_allsolid and trace_startsolid is that both will return a 1 when ever the starting point of a traceline touches a solid. They seem to act exactly alike.
What is the difference between trace_allsolid and trace_startsolid?
Are they able give more info... other than a 1 or 0?
Thanks!!
-

Junrall - Posts: 191
- Joined: Mon Sep 21, 2009 12:27 am
- Location: North West Oregon, USA
If the start and end points of the traceline were all inside solid, then allsolid is TRUE.
Otherwise, if it just starts in a solid, but ends up in open space, only startsolid is set.
Otherwise, if it just starts in a solid, but ends up in open space, only startsolid is set.
Benjamin Darling
http://www.bendarling.net/
Reflex - In development competitive arena fps combining modern tech with the speed, precision and freedom of 90's shooters.
http://www.reflexfps.net/
http://www.bendarling.net/
Reflex - In development competitive arena fps combining modern tech with the speed, precision and freedom of 90's shooters.
http://www.reflexfps.net/
- Electro
- Posts: 312
- Joined: Wed Dec 29, 2004 11:25 pm
- Location: Brisbane, Australia
Traceline and trace_allsolid
Ok... maybe traceline and trace_allsolid is not working properly or I'm doing something wrong. Here is the code I'm using... and here is a short in-game avi video ( http://www.megaupload.com/?d=O0C3KJI8 ) of my traceline being drawn with two X's and some bubbles. The red X is the starting point and the blue X is the stopping point. I am centerprinting the value of trace_allsolid.
As you can see, in the video, the only time that trace_allsolid returns a 1 is when the start of trace line touches a solid... it doesn't matter if the end point is in or out of a solid.
Any tidbit of info would be greatly appreciated.
As you can see, in the video, the only time that trace_allsolid returns a 1 is when the start of trace line touches a solid... it doesn't matter if the end point is in or out of a solid.
Any tidbit of info would be greatly appreciated.
- Code: Select all
float() test_obstruction =
{
local vector start, stop, ang;
local float hgt;
local string h;
makevectors (self.angles);
ang = normalize(v_forward) * 60;
ang_z = 0;
start = self.origin + ang;
stop = start;
stop_y = stop_y + 60;
traceline(start, stop, TRUE, self);
h = ftos(trace_allsolid);
centerprint(self, h);
if (trace_allsolid)
{
return;
}
};
-

Junrall - Posts: 191
- Joined: Mon Sep 21, 2009 12:27 am
- Location: North West Oregon, USA
r00k wrote:return true;
?
The 'if' statement and 'return' are remnants of previous code. I should have removed it before posting... sorry 'bout that.
I am using centerprint to print the output of trace_allsolid. It will print 1 (TRUE) or 0 (FALSE)... depending on whether or not the traceline's starting point is in a solid.
I had thought that the entire traceline had to be in a solid before trace_allsolid would return a 1 (TRUE)... this is not the case. It will return a 1 (TRUE) any time the start of the trace line is in a solid... even if the end of the traceline is not in a solid.
Infact, trace_allsolid and trace_startsolid act exactly the same.
If I wasn't bald... I'd be pulling my hair out!
-

Junrall - Posts: 191
- Joined: Mon Sep 21, 2009 12:27 am
- Location: North West Oregon, USA
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest