Dynamite Object1. Draw out a brush for the size you want your object. (See this tutorial if you don't know how to draw brushes.)
2. With your brush still selected, right-click on any of the 2D views, and choose 'func/func_explosive'.
3. With your brush selected, press N to open the Entities dialog box. The top window here should have 'func_explosive' selected, the middle window gives you information on what Keys/Values you can use, and the lowest window is where you enter information to change how the object will act. In the Key field type 'scriptname', then press Tab to jump to the Value field and type 'dynamitetest', then press Enter. This lets us use a script with the object, which we'll get to later. You may enter your own text instead of 'dynamitetest', but remember to also change the word in the script file we'll create later on.
***OPTIONAL***
5. Press Escape to deselect everything. Draw out another brush to surround your object, it's OK to overlap the brushes in this case. Apply the shader 'common/trigger' to the cloned brush.
6. With your trigger brush still selected, right-click on any of the 2D views, and choose 'trigger/trigger_objective_info'.
7. With the trigger brush selected, press N to open the Entities dialog box. In the Key field type 'track', then press Tab to jump to the Value field and type 'the Dynamite Test', then press Enter. This will be the text that appears on the players screen when he touches the trigger, after the words "You are near ". We need to add a couple more Keys and Values, so this time type 'shortname' as the Key and 'Dynamite Test' as the Value, and enter. This is the text that appears on the command map next to your object. Now add 'objflag' and '4' as the Value. This makes the dynamite icon appear on the command map. Lastly left-click on either the axis_objective or the allied_objective to decide which team should blow up the wall (it's reversed, for example if you select axis_objective then the Allied must blow it up).
8. Now we need to select the trigger brush and then the original brush, in that order, then press Ctrl+K to link them both together. This adds the same 'targetname' Key to both brushes with a random Value (for example, 't1'). You can also add these Keys/Values yourself to each brush, and type whatever you want, as long as both match they will be linked.
10. Now we're done with Radiant for now, and need to create a script file (or simply add the following to your existing script file if you've created this once already). Create a new plain text file, enter the following text then save it in your '/maps' directory with the filename 'yourmapname.script'. Replace yourmapname with your maps filename, obviously. (You can create a plain text file by right-clicking in an Explorer window and choosing 'New/Text Document'.) The text in quotes after 'wm_announce' will appear in game on all the players screens once the object is blown up, you can change this to whatever you want.
|
Add your comments on this tutorialDid it work for you? Is there anything I missed? Mistakes? Just want to say thanks? Let me know!
Sorry, the comments are now closed. Click here to return to the Main Page |