Forum

Noob Question!

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Noob Question!

Postby Nahuel » Sat Jul 16, 2011 3:24 pm

Hello! I need to know how to achieve that a function (Solid bsp) be solid only for the player and the monsters. Bony that the tracelines, grenades and other bullets could cross it, but so that the monsters and the player could not cross it. Greetings!!!!!!

:)
hi, I am nahuel, I love quake and qc.
User avatar
Nahuel
 
Posts: 492
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Postby Spike » Sat Jul 16, 2011 7:15 pm

.float dimension_solid;
.float dimension_hit;

interactions only happen where (solid & hit). each 'dimension' is a bit value.

the hit field used is the one from the ent in the traceline. change it before/after the call if you need.
the solid field used in the trace is from the ent that was potentially collided against.
If they don't have at least 1 matching bit, they are in different dimensions, and the trace will pass straight through and ignore the other entity.

The defaults for these fields are set to 255 by presumably the spawn() builtin.


(so set the player's hit to 511 and set the barrier's solid to 256, and players will not be able to walk through the barrier, but everything else will)
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby OneManClan » Mon Jul 18, 2011 8:01 am

Spike wrote:.float dimension_solid;
.float dimension_hit;


Hi nahuel,

I've written a walkthrough of:
ACHIEVING 'DEAFNESS' VIA .DIMENSION_SEE AND BITWISE OPERATIONS.
It's for beginners like myself, so it's pretty basic, but you may find it useful.
OneManClan
 
Posts: 243
Joined: Sat Feb 28, 2009 2:38 pm


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest