Forum

3 Traclines, 1 Entity

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

3 Traclines, 1 Entity

Postby Ghost_Fang » Fri May 20, 2011 6:48 pm

Is it possible to shoot out more than one traceline at a time within the same function, on the same entity so that another function that relies on what happens between the 3 tracelines can tell the entity what to do?
Ghost_Fang
 
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Postby Error » Fri May 20, 2011 7:36 pm

yes, I had one entity fire about 72000 tracelines. Was silly and killed my pc.

Image
User avatar
Error
InsideQC Staff
 
Posts: 865
Joined: Fri Nov 05, 2004 5:15 am
Location: VA, USA

Postby necros » Fri May 20, 2011 10:49 pm

as error said, yes you can have multiple tracelines.

but a caveat to that: the variables traceline sets (trace_endpos, trace_ent, etc...) are globals, and subsequent tracelines will destroy the previous ones. you'll have to save them in your own variables if you need to use them again.

also, wtf 72k tracelines? :P
necros
 
Posts: 77
Joined: Thu Dec 16, 2004 10:32 pm

Postby Ghost_Fang » Sat May 21, 2011 5:18 am

so can i make 3 floats and if each traceline is interrupted it sets a variable to each respective float? Thats what I'm aiming for.

if traceline 1 is less than the coded length, do this

if traceline 1 AND 2 are interrupted do this

if 1 2 and 3 are dont do anything.

thats my plan
Ghost_Fang
 
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest