Platforms are entities that, when triggered (usually by passing over them), raise up to a new height.

Posted by on - Basic Mapping/Technical

These tutorials were originally written by Hellbringer. And were originally posted to QERadiant's website. They are mirrored here for archival purposes. QERadiant can be downloaded here.


Tutorial 3

Platforms


NOTE: I'm making my tutorials to build upon the first one. If you haven't completed it, please do so; or download the map from the "Ravages of Radiant" pages. Keywords:

Brush - A solid, 3-D shape in the level. Walls, floors, boxes, and machinery are all made of brushes.

Entity - An interactive object in a level. Doors, player start-points, and ammo-boxes are all entities.

func_plat - This is the actual name for the platform entity.

*Keywords will be highlighted in bold text wherever applicable; and tasks will be in italics.

Okay, today we'll be discussing Platforms. They're a very useful part of levels; as they provide great ways not only to have multiple floors in a level; but break up the PVS as well. (The PVS is the "potentially visible set". The PVS controls how many polygons are drawn in each frame of the game. Therefore, you need to be careful about how much of the level can be seen from any one point - as large PVS's can cause slowing in your level. Ramps and stairs are one way; but a more complete method of breaking up the PVS is with platforms and elevators.)

Platforms are entities that, when triggered (usually by passing over them), raise up to a new height. They ONLY go up when triggered; and then return to a lower position after a certain time. By default, if a player remains on a lift it WON'T go down (this can be modified; but I'll explain after we make it)! This is important to remember when creating a level. If you want a moving platform that can be triggered to go both up AND down, see the elevator tutorial. I'll explain more along the way. For now, open up QERadiant. Open up the map of the first tutorial. We don't want to erase the work you did the first time around; so save it as a different name using the "File | Save As..." option from the menu bar.

Now, along the north wall (this would be the wall at the TOP of the XY view) we want to create a thin brush and place it mid-way up on the wall. To do this: make sure no brushes are selected, hold the left mouse button and drag the mouse from the upper left corner of the room (in XY view) to the far right side of the room, and part-way down. We need to make sure its a thin brush. Check in the Z axis window and adjust the size by holding down the left mouse button OUTSIDE (above or below) the new brush. Drag the mouse up or down to re-size the brush. When it's one or two grid-squares thick, you can release the left mouse button. Then, hold the left mouse button down INSIDE the thin brush and move it up or down so that it rests on coordinate 80 (in the Z-axis window). This should allow enough space for a player to stand both above and below the new brush (a player is about 64 units tall and 32 units wide).



Next, we'll create our platform entity. It is important to note that there are two types of entities: one type is fixed in size (lights, monsters, players, etc.), and the other type is variable in size (doors, platforms, elevators, buttons, and some others fall into this one). Platforms fall into the "variable-size" category, so we must first create a brush that defines how big one is, and what texture to use. Also, platforms are always drawn in the level editor in their EXTENDED position - so lighting will be done properly on them. So, deselect everything by holding CTRL-SHIFT and left-clicking on the XY view.

Now, in your XY view create another brush in the same manner as the first (hold down the left mouse button and drag it out). This one can be smaller; around 64 units wide by 64 units long is fine - it just needs to be big enough for the player to stand on. Hold the left mouse button while the cursor is INSIDE the new brush and move it into the room so that it is right next to the "second-floor" brush we created earlier (but "south" of it). Now, in the Z-axis window we need to re-size the brush some. This is so that the lift will raise up to be even with the "second-floor" brush. To do this, (in the XY view) hold shift and the right mouse button - and drag the Z-checker INTO the "second floor" brush. (There should be three blocks - one is the floor, one is the ceiling, and one in the middle is the "second-floor" brush... The Z-Checker highlights all of the brushes and entities it is "inside" of).

You should see a new colored block (probably black) in the z-axis appear . This is the "second-floor" brush. Position the mouse cursor above the new brush (which will be our platform), and hold the left mouse button down (in the Z-axis window). Drag the mouse up or down until the new brush is level with the top of the "second-floor" brush. Align the bottom of the brush with the floor. Do this by holding the left mouse button down when the cursor is BELOW the "platform" brush (in the Z-axis window)- and drag the mouse up or down until the bottom of the "platform" brush is resting on top of the floor (the bottom-most black block in the Z-axis window). It is VERY IMPORTANT that this brush be COMPLETELY INSIDE of the room. If it is not, there will be errors with the level when it compiles; and it may not run correctly!

fig1 2




Okay, now the only thing left to do is to make this brush into a platform entity... So, make sure it is selected (and only it). Position the cursor over it in the XY view and press the right mouse button. The "entity" list should pop up. Select "Func" and another menu should appear. Select "func_plat" (if you do not have the brush selected, a default-size platform will be created near the cursor). Re-select our platform and bring up the "entity" window by pressing "N" on the keyboard (In the top half of the entity window, you could scroll up or down to find the "func_plat" entity and double-click on it as an alternative to using the right mouse button; but why go to all that trouble?). Down in the lower half of the entity window screen you should see the flags and keys area. FLAGS are properties or behaviors that you can toggle on or off; and KEYS are properties you can assign more than one setting to. For instance, in this case we need to define how fast the platform will move. The default is 150. This is fine; but for our tutorial let's say we want a speed of 200. In the "key" box, type "speed" (without the quotes). Then, in the "value" box, type "200" (without the quotes). Press enter, and you should see that this key/value pair has been added to the current entity (our platform). Now, close the entity window again by pressing "N".




All that is left now is to check this out in Quake 2! Go up to "Bsp" on the member, and select "bsp_FullVis (qrad -extra)". This will completely compile our level. If you have selected "run Q2 after compiling" in the preferences, Quake 2 will start up. If not, then load quake2 like this: quake2 +set game tutorial +map mymap
Where mymap is replaced with the name of what you saved this map as. The easiest way to do this in Windows 95 is from the "Start" menu - via the "Run..." command. Hopefully everything will work on it! You should enter the level and be able to walk on to the lowered platform (should be sticking up just a bit from the floor) - and it will raise up.

Notice that it doesn't lower until you step off of it! We can modify this slightly. When you're done experimenting around, quit Quake 2 and come back to QERadiant.

You may have a "phantom" entity window pop up - this bug is being worked on. To get rid of it, simply press "N" on the keyboard - MAKE SURE YOU DO THIS IF IT APPEARS. Now, de-select everything by pressing the "ESC" key. Then shift-left click on the platform to select it. Bring up the entity window again by pressing "N" on the keyboard. Notice that there's a FLAG called "PLAT_LOW_TRIGGER". What this does is change the trigger-effect of the platform. Normally, the platform will raise any time a player passes over it (you don't have to touch it - try jumping over it in Quake 2 and notice how it raises!). With this flag checked, the platform will only raise if a player TOUCHES the platform - and ONLY when the platform is lowered all the way. Try selecting this flag, then closing the entity window and re-compiling your map. Notice how the behavior of the platform changes in Quake 2.

This concludes the PLATFORM tutorial. In the next tutorial, we'll be working on elevators - for lifts that go up or down, depending on how you trigger them. Have fun editing!



--HellBringer
Questions or comments? email: hbringer@pacbell.net
This is my first tutorial ever, so any info or feedback would be appreciated!

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: