quake2 - monster_ entities, trigger_monsterjump, point_combat

At first thought you might think that the monster_ entities would be pretty simple to use, but actually there is quite a large number of options that you can use to make the monsters act in different ways.

There are 24 different monsters entities. They are:

monster_berserk, monster_boss2, monster_boss3, monster_brain, monster_chick, monster_flipper, monster_floater, monster_flyer, monster_gladiator, monster_gunner, monster_hover, monster_infantry, monster_jorg, monster_makron, monster_medic, monster_mutant, monster_parasite, monster_soldier, monster_soldier_light, monster_soldier_ss, monster_supertank, monster_tank, and monster_tank_commander, and monster_commander_body.

Monsters are of course the heart and soul of a single player quake level. Sure you might have awesome architecture, good use of light, and low framerates but without the proper use of the monster_ entities your level will be just another average level. Using the monster_ entities to their fullest is the first step in creating an unique and fun experience.

For the extreme beginners out there I will explain how to get a monster into your level and working.

First thing you need to do is create the monster entity of your choice and place it flat on the floor. Creating entities can be somewhat different depending on what editor you are using. Be sure to set the angle of the monster to what direction you want the monster facing when the level starts. If the monster is not facing the player then it will not attack until you shoot at it. There is actually more to this that I will explain in a minute. You also need to make sure that there is enough room for your monster to stand. If you get them to close to a wall then you might have a problem with it stuck in a wall or falling through the level. That's about all there is to creating and placing the monster_entities. Now I will explain some of the more advanced options

 The first thing you might want to know is all the different key value pairs and spawnflags that are available and what they do. The key value pairs that are unique for the monster_ entities are killtarget, combattarget, deathtarget, and item. What killtarget does is when the creature is killed the entity or entities with the corresponding targetname are removed from the game. So lets say we have a tank that when killed all the weapons in the level disappear. To do this we would give all the weapons a targetname of weapon, and then give the monster a killtarget key value pair and a target key value pair and set them both to the targetname of the weapons. It will not work if you just give it a killtarget or likewise if you just give it a target to the weapons. You must have both set.

What combattarget does is when the monster sees the player it will move to the point_combat specified by the combattarget. So in other words you must have a point_combat to be able to use the key value pair combattarget. So for example lets say you want the monster to set off an alarm when he sees the player. You would have to make a point_combat near a trigger_once entity which will set off the alarm. So you would give the point_combat a targetname of combat1. Now create the creature and give it a combattarget of combat1. So now when the monster sees the player he will walk towards the point_combat and trigger the alarm then turn around and attack the player. I have also noticed that if you simply use the key value pair target to link the creature to the point_combat that it will work in the same way. Strange.

Deathtarget when set, will trigger the corresponding entity with the correct targetname when the monster is killed. You could use this for a variety of cool effects like disabling a force field when the monster is killed or turning off all the lights. For example, let's make it so when the monster is killed the light will shut off. I have no clue why you would want this to happen but oh well. =) First make the light and give it a targetname of light1. Now make the monster_gunner or whatever monster you want and give it a deathtarget of light1. Now when you kill the monster the light will shut off. Pretty cool huh?

Item is something that EutecTic told me about that is awesome. I always wondered how to do it and my friend came to the rescue once again. What item does is when the monster is killed the item specified with the item key value pair will be spawned. So lets say you want to make it so when you kill the gladiator that the blue key is spawned at his dead body. All you would need to do is make the gladiator and give him a key value pair item and set it to key_blue_key. That's all there is to it. Very cool.

There are also 3 spawnflags that you can set for any given creature_ entity. These are ambush, trigger_spawn, and sight.

Ambush and sight do exactly the same thing. By default a creature will only notice you when you are in it's line of site or it hears you shoot one of your weapons. Even if it is behind a door and it hears you shoot a weapon it will become active. They will even open the door, and attack you. If you set the ambush or sight spawnflag then the creature will not be activated and will not attack if it's view is blocked. If the creature is not behind a wall or behind a door, and has a direct point of sight to the player then it will act as any other creature and become active. So lets say there are 2 creatures right behind a door, one has sight or ambush set and the other does not. If you shoot your gun then the one without sight or ambush will become active, open the door, and attack you while the one with sight or ambush set will not do anything. It will attack when it sees you or hears you when there is a direct line of sight. If there are 2 monsters in a big wide open room with one having ambush or sight set and other without and you shoot your gun then BOTH monsters will be activated and will attack. Ambush or sight only affect the creatures behavior when they are blocked from view by a wall or a door.

trigger_spawn will spawn the monster when triggered. So in other words the creature with trigger_spawn set will not appear when the level begins and will only appear when a entity of some sort triggers the creature. So therefore you must give the monster a targetname. For example. Lets say we want a group of creatures to surprise the player in an area where he has already been and must return to sometime during the game. We would make the group of creatures first, setting the spawnflag trigger_spawn for all of them and giving them each a targetname of monster. Not we will make a trigger_once somewhere in the level and set the target to monster. So therefore when the player walks over and sets off the trigger_once the group of creatures you gave the trigger_spawn flag and the targetnames to, will appear.

There are also a few other things that you can do with the monster_entities.

If you give the monster a targetname and then target the monster with some sort of entity WITHOUT trigger_spawn set then when the monster is triggered it will hunt down the player who activated the trigger. Very cool.

trigger_monster_jump is an entity that can only be triggered by a monster and will make the monster jump in the specified direction, speed, and height. The key value pairs that can be set are angle, speed, and height. Angle determines the direction the creature jumps, speed is the velocity of the jump, and height is the altitude the creature jumps. It can be used for a variety of cool effects like a creature jumping off a ledge at you.

Another cool thing that you can do with the creature entities is make them wander around. To get this effect you must you path_corners. So create the monster that you want to wander around and target it to a path_corner. If you only have 1 path_corner then the monster will walk to it and then just stand there are look around. If you have multiple path_corners all linked together then the monster will wander from path_corner to path_corner stopping and looking around every once in awhile. I have also noticed that the monsters do not follow the path_corners exactly and sometimes wander off of the path.

One thing that I mentioned earlier but I would like to go over again is the point_combat entity. Point_combats are used just like path_corners. They are not drawn in the map. Point_combat entites are simply points that the monster will walk to before attacking the player. You can have more then one linked. Just give each point_combat a target to the next. Remember though that the monster will not attack until it is finished walking it's point_combats. In the example map I made 2 monster_chicks that when they see the player they take cover behind 2 low lying walls. This effect was achieved using point_combats. By default once the monster reaches the last point_combat it will go after the player like a normal monster. If you set the spawnflag hold on the point_combats then the creatures will hold their position once they reach the last point_combat and attack you from there. One thing I did notice though is if you shoot the monster and hurt it then it will quit following its point_combat and just attack the player.

There are a couple monster entities that don't act like the others. They are monster_makron and monster_commander_body. monster_makron is a broken entity and shouldn't be used and monster_commander_body is just the dead body of a monster_tank_commander that is just used for decoration.

I hope that this tutorial opened your eyes to many possibilities you can use the monster_ entities for. I thought that writing this tutorial was the one that I learned the most from out of all of the tutorials and I hope that it helped you as much as it helped me. If you find any errors or something new then please email me and let me know.

The example map was very hard to do without making a whole new level, which I didn't do. So it might not be as helpful as previous example maps. It does include examples of monsters for all the examples though. Download it [here]. If you have any more question the please post them on the discussion board.

Return to Tutorials Page...

Copyright Crap