Nazi Zombie Portable
Please log in or register. If you're not logged in you cannot download maps.

Nazi Zombies Portable Official Community


You are not connected. Please login or register

Electric Traps Tutorial (Written/Text Only)

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Electric Traps Tutorial (Written/Text Only) on Sat Aug 24, 2013 1:03 am

So all this time I've not really seen any electric traps in the maps from "Members" or even "Developers". I've decided to make a tutorial so that people can do it without having to struggle because it IS kind of hard, I have to accept it myself... There's quite a few entities that you have to set up. So I've come up with a simple and fast solution.

Anyways, let's get to the point... First, I need you to edit your nzp.fgd file so that you make your life easier by making yourself the entities without having to type them in... I already set them up for you... What you have to do is simply open up World Craft or Valve Hammer Editor, whichever you have and go to the bar on top... Look for the button that says "Tools..." click on the bottom where it says "Options". After that a dialog box is going to appear. There is a bunch of tabs, look for the one that says "Game Configurations". There it has a bunch of inputs and everything... There's a box that says "Game Data Files:" Click on your already set up file location of your .fgd file. For example: C:\Users\username\Desktop\Worldcraft\nzp.fgd

When you click it, it's going to appear blue... After you select it, click on the button located at the right side of the box which says "Edit".
It should pop up on notepad or something. After notepad pops up, you're going to see, probably unknown to you, some code. Scroll all the way down and paste the following code:


@PointClass = item_switch : "Trap Switch" [
targetname(string) : "Name"
target(string) : "Target"
]
@PointClass = zapper1 : "Ray 1" [
targetname(string): "Name"
target(string) : "Target"
]
@PointClass = zapper2 : "Ray 2"[
targetname(string) : "Name"
target(string) : "Target"
]
@PointClass = zap_light : "Ray Light"[
targetname(string) : "name"
]
@SolidClass = trigger_electro : "Trigger Electricity"[
targetname(string) : "Name"
]



Yes I came up with it myseslf just by observing the rest of the code... Anywho, that should work... Save the file and close it. Restart WorldCraft or Valve Hammer Editor and when you type in the name of the entities, they should pop up without you having to edit them completely... In other words, they're going to appear like normal entities.

Now here's the tricky part... I won't really have any pictures because I don't have time but I hope you guys understand this clearly... I might do some visual stuff too.

1. Select the item_switch entity and set it NEXT to the open area that you want it to activate. Then edit its properties... give it a name and a target. You don't really need a name but whatever, you can do it if you want... For example, you would want to name it trapSwitch1 and have the target to trap1.

2. Next, select the zapper1 entity and set it where you want the trap to start... For example, if you want to put it over a doorway... put it on the top part of the doorway. Give the entity a name and a target... The name has to be the item_switch's target though... In this case, the name would be trap1... Now the target is going to link to zapper2 so make sure you name it something else... like bottomZap1. You might want to create multiple zapper1 entities so that it's not just one of them that is killing the zombies... Try to make it look something like this...
*NOTE* PLEASE DON'T MIND THE DOTS, THEY'RE JUST PLACEHOLDERS

______
|\/\/\/ |
|........|
|_____|
The V's are the zapper1 entities... Make sure to name all the zapper1 entities the same... For example, trap1.


3. Then, create the zapper2 entities below the zapper1 entities... Basically on the floor. Name them what you named zapper1's target... in this case it would be bottomZap1... Again, make as much zapper2 entities perpendicular to your zapper1 entities... It would look kind of like this...

| \/\/\/ |
|.........|
|.........|
|..x.x.x.|


The x's are your zapper2 entities... Name them... For example, bottomZap1... They all have to have the same name as well...

4. The next step is to create your zap_light entity, place it right above your zapper1 entities... You only have to have one, it's just telling you that the trap was activated. Give it the same name as the zapper1... For example, trap1. It should look something like this...

 ____
 _|*|
| \/\/\/ |
|.........|
|.........|
| x x x  |

Your * symbol is the zap_light... Remember to name it the same as the zapper1 entity.

5. The last step is to set up your trigger_electro (brush) entity... To do that, create a box like you normally would and place it right in between your zapper1 and zapper2 entities... You should probably put a trigger texture on it so you can identify it... Once you have created the box, tie it to entity (CTR + T)... on the class input box, delete the buy_weapon entity and replace it with trigger_electro. Set its name also the same as the zapper1's name... So in this case it would be trap1...

You're pretty much done now, hope this helped you guys and it was understandable... Tell me if I missed something or if I didn't explain it well so I can edit and improve my tutorial. Have fun with traps!



Last edited by Manuel Valle7 on Sat Aug 24, 2013 11:36 am; edited 1 time in total

View user profile

Guest


Guest
@Manuel Valle7 wrote:So all this time I've not really seen any electric traps in the maps from "Members" or even "Developers". I've decided to make a tutorial so that people can do it without having to struggle because it IS kind of hard, I have to accept it myself... There's quite a few entities that you have to set up. So I've come up with a simple and fast solution.

Anyways, let's get to the point... First, I need you to edit your nzp.fgd file so that you make your life easier by making yourself the entities without having to type them in... I already set them up for you... What you have to do is simply open up World Craft or Valve Hammer Editor, whichever you have and go to the bar on top... Look for the button that says "Tools..." click on the bottom where it says "Options". After that a dialog box is going to appear. There is a bunch of tabs, look for the one that says "Game Configurations". There it has a bunch of inputs and everything... There's a box that says "Game Data Files:" Click on your already set up file location of your .fgd file. For example: C:\Users\username\Desktop\Worldcraft\nzp.fgd

When you click it, it's going to appear blue... After you select it, click on the button located at the right side of the box which says "Edit".
It should pop up on notepad or something. After notepad pops up, you're going to see, probably unknown to you, some code. Scroll all the way down and paste the following code:


@PointClass = item_switch : "Trap Switch" [
targetname(string) : "Name"
target(string) : "Target"
]
@PointClass = zapper1 : "Ray 1" [
targetname(string): "Name"
target : "Target"
]
@PointClass = zapper2 : "Ray 2"[
targetname(string) : "Name"
target(string) : "Target"
]
@PointClass = zap_light : "Ray Light"[
targetname(string) : "name"
]
@SolidClass = trigger_electro : "Trigger Electricity"[
targetname(string) : "Name"
]



Yes I came up with it myseslf just by observing the rest of the code... Anywho, that should work... Save the file and close it. Restart WorldCraft or Valve Hammer Editor and when you type in the name of the entities, they should pop up without you having to edit them completely... In other words, they're going to appear like normal entities.

Now here's the tricky part... I won't really have any pictures because I don't have time but I hope you guys understand this clearly... I might do some visual stuff too.

1. Select the item_switch entity and set it NEXT to the open area that you want it to activate. Then edit its properties... give it a name and a target. You don't really need a name but whatever, you can do it if you want... For example, you would want to name it trapSwitch1 and have the target to trap1.

2. Next, select the zapper1 entity and set it where you want the trap to start... For example, if you want to put it over a doorway... put it on the top part of the doorway. Give the entity a name and a target... The name has to be the item_switch's target though... In this case, the name would be trap1... Now the target is going to link to zapper2 so make sure you name it something else... like bottomZap1. You might want to create multiple zapper1 entities so that it's not just one of them that is killing the zombies... Try to make it look something like this...
*NOTE* PLEASE DON'T MIND THE DOTS, THEY'RE JUST PLACEHOLDERS

______
|\/\/\/ |
|........|
|_____|
The V's are the zapper1 entities... Make sure to name all the zapper1 entities the same... For example, trap1.


3. Then, create the zapper2 entities below the zapper1 entities... Basically on the floor. Name them what you named zapper1's target... in this case it would be bottomZap1... Again, make as much zapper2 entities perpendicular to your zapper1 entities... It would look kind of like this...

| \/\/\/ |
|.........|
|.........|
|..x.x.x.|


The x's are your zapper2 entities... Name them... For example, bottomZap1... They all have to have the same name as well...

4. The next step is to create your zap_light entity, place it right above your zapper1 entities... You only have to have one, it's just telling you that the trap was activated. Give it the same name as the zapper1... For example, trap1. It should look something like this...

 ____
 _|*|
| \/\/\/ |
|.........|
|.........|
| x x x  |

Your * symbol is the zap_light... Remember to name it the same as the zapper1 entity.

5. The last step is to set up your trigger_electro (brush) entity... To do that, create a box like you normally would and place it right in between your zapper1 and zapper2 entities... You should probably put a trigger texture on it so you can identify it... Once you have created the box, tie it to entity (CTR + T)... on the class input box, delete the buy_weapon entity and replace it with trigger_electro. Set its name also the same as the zapper1's name... So in this case it would be trap1...

You're pretty much done now, hope this helped you guys and it was understandable... Tell me if I missed something or if I didn't explain it well so I can edit and improve my tutorial. Have fun with traps!
tl;dr It's allot easier than this.

true nightmare

avatar
Administrator
Administrator
I did make a video on this you know :/


____________________________________________________________________________________________________
BE AWESOME!! And Subscribe to my channel for Nzp mapping tutorials and gameplays of nzp and other stuff im doing or working on, at some point i hope to do daily uploads

www.youtube.com/user/turenightmare



CPU: Intel Core i5 4690K Processor (Quad Core at 3.5 GHz)
GPU: GeForce GTX 660 (2GBs Video Ram)
RAM: 32GBs DDR3
HDD: 1 x 320 Gbs, 1 x 1TB, 1 x 2TB
Monitor: 1336 x 768, 1920 x 1080 (TV)
View user profile http://youtube.com/user/turenightmare

Guest


Guest
@true nightmare wrote:I did make a video on this you know :/
Exactly. Allot easier than this. Most ppl here are tl;dr anyway.

true nightmare

avatar
Administrator
Administrator
I have no idea what tl;dr means because I speak English lol


____________________________________________________________________________________________________
BE AWESOME!! And Subscribe to my channel for Nzp mapping tutorials and gameplays of nzp and other stuff im doing or working on, at some point i hope to do daily uploads

www.youtube.com/user/turenightmare



CPU: Intel Core i5 4690K Processor (Quad Core at 3.5 GHz)
GPU: GeForce GTX 660 (2GBs Video Ram)
RAM: 32GBs DDR3
HDD: 1 x 320 Gbs, 1 x 1TB, 1 x 2TB
Monitor: 1336 x 768, 1920 x 1080 (TV)
View user profile http://youtube.com/user/turenightmare

Guest


Guest
@true nightmare wrote:I have no idea what tl;dr means because I speak English lol
To long;didn't read.

@true nightmare wrote:I did make a video on this you know :/
I know, you talked pretty low though and it's hard to listen... at least on my comupter. By hey, why not expose it once more?

Besides, it's really long because it's very descriptive... There's a couple n00bs here you know so I gotta make it understandable

View user profile
Not Bad.

View user profile

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum