Week 15 Day 1 - QuakeC Part III - Traceline, Hitscan Weapons, and Find

Channel:
Subscribers:
2,640
Published on ● Video Link: https://www.youtube.com/watch?v=UbDLneCrseo



Duration: 1:21:02
61 views
2


Today we started by playing Hunted and Hunted2k, which are a different style of game than the usual capture the flag gameplay that Team Fortress is famous for. In Hunted, one player plays the President (a weak civilian class) and everyone else plays either a bodyguard to protect the president or an assassin trying to take the president out. In the first map Collins and I sniped the president a lot, so we switched it up and moved to Hunted2k, and I eventually played as President and got out a few times. Of note, Yellow managed to summon a shambler which was very effective at guarding the escape area. However, the President can stealth, and so I was able to sneak by a few times.


In QuakeC, we talked about Hitscan weapons today. Hitscan weapons (which include things like shotguns and axes, anything that doesn't create a projectile) work by doing a traceline which takes a starting and ending point, and returns the first entity along that line. (It can be set to ignore different things as well.)


Traceline sets a global variable called trace_fraction which will be between 0 and 1 showing how far along the trace the line got before it hit something (1 if it missed), and trace_ent will be set to the entity that it hit (0 if it hit the world).


TF_T_Damage is the function we use to damage people. It's a big complicated function that accounts for things like having multiple damage and armor types, team damage, bypassing armor, knockback, and things like that.


Find is a function that finds all entities of a certain type, which is akin to a similar function in UE4 that finds all actors by classname.







Tags:
is50a
hunted
quake
quakec
traceline
find
hitscan