Difference between revisions of "How to create electric fences"
From Platinum Arts Sandbox Free 3D Game Maker
(Created page with 'To create electric fences or sth similar you need to do the following: *First open up the map you want to make electric fence on. In current case(ICC from now on) fence *Make a f…') |
|||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | ==Method 1== | |
*First open up the map you want to make electric fence on. In current case(ICC from now on) fence | *First open up the map you want to make electric fence on. In current case(ICC from now on) fence | ||
− | *Make a fence like thing, I made this: [http://i32.tinypic.com/2mfyzwp.png fence] | + | *Make a fence like thing, I made this: [http://i32.tinypic.com/2mfyzwp.png fence]. You can also use a model. |
*you can use particles to make it cooler [http://i28.tinypic.com/166et8x.png particles] | *you can use particles to make it cooler [http://i28.tinypic.com/166et8x.png particles] | ||
− | *Surround it with respawn, you can do it by selecting area pressing F3 and selecting respawn from materials tab [http://i26.tinypic.com/1hfd41.png respawn] | + | *Surround it with respawn, you can do it by selecting area pressing F3 and selecting respawn from materials tab [http://i26.tinypic.com/1hfd41.png respawn], or selecting the area and hitting SHIFT+R. |
*Save your map and close sandbox | *Save your map and close sandbox | ||
*make a cfg file to your map, you can do that by going to my_stuff/packages/base and making a new text document, which then must be renamed to yourmapname.cfg, ICC fence.cfg | *make a cfg file to your map, you can do that by going to my_stuff/packages/base and making a new text document, which then must be renamed to yourmapname.cfg, ICC fence.cfg | ||
*Type the following to your maps cfg file: | *Type the following to your maps cfg file: | ||
− | + | level_trigger_1 = [ echo "You just got shocked!" ] | |
*Save it and open up sandbox | *Save it and open up sandbox | ||
Line 14: | Line 14: | ||
*if you used a mapmodel instead of making the fence with cubes, then just select the mapmodel and press F3 and set trigger tag to 1 and trigger type to 11 | *if you used a mapmodel instead of making the fence with cubes, then just select the mapmodel and press F3 and set trigger tag to 1 and trigger type to 11 | ||
*if you did it with cubes then create a new mapmodel, select it, press period (.), and set the second value to -1. That creates a invisible mapmodel, which you must now place in your fence. Do the same things as said in last step. | *if you did it with cubes then create a new mapmodel, select it, press period (.), and set the second value to -1. That creates a invisible mapmodel, which you must now place in your fence. Do the same things as said in last step. | ||
− | *If you try to go near your fence now, you will respawn and a text will appear that you got shocked (or whatever you wrote to your maps cfg file) | + | *If you try to go near your fence now, you will respawn and a text will appear that you got shocked (or whatever you wrote to your maps cfg file), NB! If you don´t die, then you need to make the respawn area bigger |
+ | |||
+ | ==Method 2== | ||
+ | *this version uses more coding, and may (or may not) be more efficient, your choice. | ||
+ | |||
+ | *First off, make a fence, like in Siim's tut. | ||
+ | *then add lightning as needed. | ||
+ | *Instead of adding respawn, add an empty mapmodel (a model with a value of -1). Give it a trigger type of 8, and a trigger tag of #. | ||
+ | *Now go to the cfg and type: | ||
+ | |||
+ | level_trigger_# = [ echo "You got shocked!" ; nap ] | ||
+ | |||
+ | The nap command is like a kill command. |
Latest revision as of 19:27, 13 May 2012
Method 1
- First open up the map you want to make electric fence on. In current case(ICC from now on) fence
- Make a fence like thing, I made this: fence. You can also use a model.
- you can use particles to make it cooler particles
- Surround it with respawn, you can do it by selecting area pressing F3 and selecting respawn from materials tab respawn, or selecting the area and hitting SHIFT+R.
- Save your map and close sandbox
- make a cfg file to your map, you can do that by going to my_stuff/packages/base and making a new text document, which then must be renamed to yourmapname.cfg, ICC fence.cfg
- Type the following to your maps cfg file:
level_trigger_1 = [ echo "You just got shocked!" ]
- Save it and open up sandbox
- Open your map, ICC fence
- if you used a mapmodel instead of making the fence with cubes, then just select the mapmodel and press F3 and set trigger tag to 1 and trigger type to 11
- if you did it with cubes then create a new mapmodel, select it, press period (.), and set the second value to -1. That creates a invisible mapmodel, which you must now place in your fence. Do the same things as said in last step.
- If you try to go near your fence now, you will respawn and a text will appear that you got shocked (or whatever you wrote to your maps cfg file), NB! If you don´t die, then you need to make the respawn area bigger
Method 2
- this version uses more coding, and may (or may not) be more efficient, your choice.
- First off, make a fence, like in Siim's tut.
- then add lightning as needed.
- Instead of adding respawn, add an empty mapmodel (a model with a value of -1). Give it a trigger type of 8, and a trigger tag of #.
- Now go to the cfg and type:
level_trigger_# = [ echo "You got shocked!" ; nap ]
The nap command is like a kill command.