Trigger an entity spawn on break.

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 :)

Oh noes! You're not a Member!

Want access to cool stuff? As a member you can:

  • Post. Give the submitter your thoughts on this Tutorial.
  • Say Thanks. Show your appreciation by sending the submitter points.
  • Stamp Posts. Let other posters know what you think of their posts.
  • Rate. Give this Tutorial a rating out of 10.
  • Flag. Alert moderators and warn members of a problem with this Tutorial.
  • Vote. Vote the submitter for the Monthly Awards.
  • Subscribe. Get notified when this submitter submits again.

Interested? Register or Login

Comments

None found

Credits

Submitter
im_the_new_guy's Levels
  • P2: Drudge
    Points: 2,000
  • C1: Member
  • A5: Veteran
    Account Age: 4 years
im_the_new_guy (Creator/Co-creator)
Studio
Studio
Hide N Seek Studios
Key Authors
I'm the new guy, go easy :D
Writer

Rating

?/10
Not yet rated.

Additional Info

Genre
Mapping
Difficulty Level
Intermediate

Stats

Post Count
0
ViewCount
1,115
Date Added
3 years ago
Date Modified
3 years ago

Share

Embed Code
Code to use:

More embeddable images

Bookmark and Share