Game_Entity Tutorial Part 1 | W A V E L E N G T H |
![]() |
by HellBringer | April 15, 1999 |
![]() |
|
|
![]() |
Welcome to the Game_entity tutorial, part 1! Why part 1? Well, basically because there is SO MUCH you can do with these new entities, its best that you learn the basics with this one; and then we'll expand on this map in the next tutorial! This tutorial deals almost entirely with entities; so there are almost NO screenshots. I STRONGLY advise you to print this out; and have it handy to work off of while WorldCraft is running. First, let's get some information to you:
Okay, first on the list is to GRAB THE STARTING MAP HERE. I've done the grunt-work and made us a very simple team-play-ready map. It works as a single player map right now; so why don't you compile and run it in SINGLE PLAYER mode right now to get a feel for the map. If ANY part of that map confuses you (other than the fact that the doors and window-coverings aren't triggered by anything), you need to STOP. Go back and read earlier tutorials at Wavelength, and they will explain everything that is in this map. Here are some notables to clear things up if you look at the map in WorldCraft:
Let's get started, shall we? Load up WorldCraft and open up the map. The first thing we need to do, to make this a teamplay map, is to make the team-controlling entities. These are done with "game_team_master" entities. Go ahead and switch to entity mode. Place an entity somewhere in the map's playing field area.
NOTE: Exact placement doesn't matter with most of the entities we'll be dealing with (I'll tell you when it does); just make sure that they don't overlap each other, OR any solid brushes. It also usually helps to group the entities together. Click here to see a shot of how I arranged things when I made the map (this is a shot of the "completed" project, so there are new objects and entities that are NOT yet in the map that you have).
Once you've aligned your entity in both the XY views and the YZ or XZ views, hit ENTER to create the entity. Now switch to selection mode. Select the new entity and bring up the properties window. Change the entity class to "game_team_master". Set the following properties:
KEY | VALUE |
TeamIndex | 0 |
Name | teammaster0 |
(Teams are numbered starting at 0 and working up, so the second team is #1, the third team is #2, etc).
Now switch back to Selection mode. Select this entity and copy it. Paste it nearby. Bring up the entity properties again, and set them to the following:
KEY | VALUE |
TeamIndex | 1 |
Name | teammaster1 |
Next, let's go make sure that the map is going to use our teams the way we want. Select "Map" from the menu, then "Map Properties". Make sure that there are two models listed under "Map Team List", and that "Default Team" says "Fewest Players". This will ensure that unless a server operator manually overrides our map, this will be a two-team map; and new players will automatically be put on the team with the least number of players. Once we're sure that our teams are going to work, its time to place some team-specific starting points. Switch back to entity placement mode. Place an "info_player_deathmatch" entity into the map, and move it into the bunker on the LEFT in the XY view. Make sure that the starting point is COMPLETELY inside the bunker, and isn't touching or overlapping the walls, floor, or ceiling of the bunker. Change to selection mode and bring up the entity properties box for this entity; and set the following:
KEY | VALUE |
Master | teammaster0 |
This forces the info_player_deathmatch entity to use the "teammaster0" entity as its "Master" - a Master can be thought of as a "controlling" entity. It sets the conditions for when the "slave" entity can and cannot work (or be triggered). In this case, we've mastered the starting point with the Team 0 "game_team_master" - so ONLY people on Team 0 can start or respawn here. Of course, having only one respawn point would be silly in a real team game, so let's make sure you're in Selection mode, and then copy and paste this entity a few times around inside the bunker. BE SURE to check every one's alignment, so that none are overlapping each other or the bunker!
So now we have one team's starting points - but we can't leave out the other team's! Move your XY view over to the "right-hand" bunker, and paste again just ONCE. Now, select this info_player_deathmatch entity and align it inside of the bunker so that it doesn't overlap anything. Bring up the entity properties, and set the following (note: This is close, but not the same as the previous deathmatch entities):
KEY | VALUE |
Master | teammaster1 |
Once again, copy and paste this new entity a few times inside of this bunker. BE SURE to check every one's alignment, so that none are overlapping each other or the bunker! Save, compile, and test this map in TEAMPLAY MODE (see the note at the beginning of the tutorial about how to do this). When on the "hgrunt" team you should spawn in one bunker, and if you switch to the "scientist" team, you will spawn in the other bunker. To switch teams, simply bring down the console and type in "model modelname" (without the quotes) - where "modelname" is the name of the model to switch to, i.e. "model hgrunt" (without the quotes of course).
![]() |