Shows u how to spawn a entity when something is broken.
Hello.
By request of a bloke on another forum, I am going to show all you mappers how to spawn an entity when a trigger sets it off (IE a box breaking). This will include pretty pictures and lots of placed to colour in (SVENARE) to keep the ADD guys entertained for seconds!
Lol ok, lets get into it shall we?
This tutorial will make the assumption that you know how to create entities and program them, as well as your basic skybox etc.
STEP ONE - Items needed.
We will need the following entities/functions:
[] Point_template [] Funcbreakable [*] Weaponhegrenade [] Infoplayerterrorist (spawn point) [] Glass Box (crated with block tool) [*] A nice cold beer (because mapping sober is like fishing....sober...)
STEP TWO - Placing & Naming.
[] Place the infoplayerterrorist entity anywhere on the map, after you have made your skybox etc. This is going to be our spawn point. [] Create another entity and change it to Pointtemplate. Call this entity "nadespawner" [] Create a glassbox and change it to func_breakable. [] Create a entity and change it to weapon_hegrenade. Call this entity "nade"
As promised, the pretty picture below shows how it should all look.
http://fastdl.hideexec.net/newguy/fpsbanana/tuts/spawnerweapon/sdktut_1.JPG
Ok, so you see we currently have the entities on the bored.
STEP THREE - Configuration
[] Ok, firstly, open the User interface for the point_template entity. You will see lots of the same thing: template#. Open up template 1 and where the text box is, type "nade" in. [] Open the user interface for the glass box (Func_breakable) and click on the outputs tab, located at the top.
http://fastdl.hideexec.net/newguy/fpsbanana/tuts/spawnerweapon/sdktut_2.JPG
[*] Now you will see a screen that looks like this:
http://fastdl.hideexec.net/newguy/fpsbanana/tuts/spawnerweapon/sdktut_3.JPG
[] This is where we are going to tell the point_template entity what to do. [] Click on the add box and the greyed out boxes will turn white. [] Enter the following input in: [] My output named:Onbreak - What is going to trigger it (in this case the box breaking) [] Targets entities named: nade_spawner[color="#FF00FF"]- the entity that is going to spawn out nade[/color] [] Via This Input: ForceSpawn - the command to make the entity spawn the nade [*] The delay in seconds part is optional. It just delays the spawning of the nade for how ever long you want.
Your outputs box should look like this: http://fastdl.hideexec.net/newguy/fpsbanana/tuts/spawnerweapon/sdktut_4.JPG
Click apply.
STEP FOUR - Recap
[] What should happen when you compile your map, is when you destroy the glass box, it will spawn a hegrenade, where ever you placed it (the weaponhegrenade entity). [] This method can be used with multiple triggers, like funcbutton, triggermultiple, func_door etc etc.
Hope this tutorial helped :)

