Time to revise an old classic. I wrote a tutorial on Inside3d some time ago on how to make a spawnflag for teleporting monsters. One of the features I was proud of in the code was that the changes were centralised – you didn’t need to modify each monster individually to apply the spawnflag. Since the original is no longer live, but demand for the feature continues, I’ve decided to repost it. Continue reading
Code
QC code samples or tutorials
Choose Your Own Adventure
I created a new thing on func_msgboard about fixing a backwards compatibility issue. Start here
Zero Length Strings
AKA the Killtarget bug. This one came up during Map Jam 7, and it’s a bug which affects classic Quake and Quoth alike (note to future readers, if Quoth is past version 2.2 then this is no longer the case…). It manifests itself when a rogue entity deletes everything on the map without a targetname – including the player! This is obviously a showstopper, but to understand why it happens we need to explore a subtle detail of the QuakeC language.
Continue reading
Missing items and the restart command
Quake doesn’t give mappers direct control over the items a player starts with. If you want the player to have a nailgun from the moment the level starts, overlapping the weapon with the spawn point seems like a good idea. Most of the time the player picks up the weapon immediately and all is well, but a bug occurs if the player uses the restart command to load the level from the beginning – the item falls out of the level! This article takes a brief look at why, and then suggests how to modify the QuakeC code to work around it. Continue reading
Selective clipping
Today we’re going to create a pair of entity classes; one of which will work like a brush that only collides against players, and its opposite which collides with everything but players. However, these entities work best when they are comprised of clipping brushes, and there’s a quirk with clip in brush entities we must work around first. Continue reading