Vlatitude: Monstermaker Tutorial Last edited 1 year ago2022-09-29 07:56:22 UTC

Download example

Even if you know nothing about the monstermaker entity, do you think you could guess what it does? What did you say? It makes monsters? Well, that's partially right. One of the purposes for this entity is to make monsters out of....thin air! However, this entity is more flexible than that because you can make other items, and even control some of their properties. Read on!

First, let me explain what I mean by "making." If you have worked with making levels for other games, you might have heard the expression "spawn." Imagine an assembly line: the line itself isn't important, what's important is the final gateway from which the finished product emerges. Putting a monstermaker entity into your level is like putting this gateway into your level, from which monsters or items will pop out. The beauty of the entity is that you can not only control how your creations are generated, but even the products themselves.

Although it's called monstermaker, the entity can make other things as well. What can it make? It can make entities that don't have properties crucial to their existance. For example, we can spawn a shotgun, we can spawn a headcrab, but we can't spawn a func_water. Understand that you can only spawn an item that you can "give" to yourself in cheat mode from the Half-Life console, monsters, or something that you can pick up at some time in the game. This concept can be made easier because the items you'll be making are two-word items, like weapon_shotgun, monster_headcrab, item_suit: they'll start with the word weapon, monster, or item. Now, let's get to the usage of the monstermaker entity. Put it in your level where you would like your newly-made items to be created. Go into its properties, and you will see that it has a name, and a start on flag, which means that you can start it non-functional, and then turn it on. The monster type attribute is the most important one. This is where you tell the monstermaker what you want it to create. Like I've already said, despite its name, you can also enter ammo or a weapon there, just make sure it's in the weapon_satchel or monster_zombie format. The Childrens' name is also important, as it gives you a lot of control over your creations. This will make all things created by this monstermaker targettable. So what? Well, you can create a monster with monstermaker, and then have almost full control of it using scripted_sequence and scripted_sentence entities! For the number of monsters, the default value is -1, which is equal to infinity. This is the total number of items that will be created by this monstermaker entity. The frequency is how quickly the new objects will be created, and the max live children can be used to limit the flow of objects.

Although this entity is fun to use to surprise the player with monsters, another very beneficial use for it is when targetted by func_breakables. When you have a normal breakable crate, you can only spawn one thing to appear when it's broken. However, if you make a crate trigger some monstermakers with the same name, you can have oodles of stuff like ammo pop up. To see this and other uses of monstermaker, grab my example map.
This article was originally published on 69th Vlatitude.
The original URL of the article was http://www.vlatitude.com/tutorials.php?tutID=22.
The archived page is available here.
TWHL only publishes archived articles from defunct websites, or with permission. For more information on TWHL's archiving efforts, please visit the TWHL Archiving Project page.

Comments

You must log in to post a comment. You can login or register a new account.