UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

How do you make electric traps to work

broken avatar :(
Created 8 years ago
by Mr_BlackOP
0 Members and 1 Guest are viewing this topic.
4,091 views
broken avatar :(
×
broken avatar :(
Location: nlLimburg
Date Registered: 1 February 2014
Last active: 4 years ago
Posts
5
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
Mr_BlackOP's Groups
Mr_BlackOP's Contact & Social LinksturbojarnoMr_BlackOPturbojarnoYouTube
I have the script for a loop already from one of jbird632's  videos but how do i link that with an actual electric trap in the game?
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 12 September 2016
Last active: 3 years ago
Posts
306
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
×
reckfullies's Groups
reckfullies's Contact & Social LinksReckfulliesReckfullies
I have the script for a loop already from one of jbird632's  videos but how do i link that with an actual electric trap in the game?

You would need to script the fx and the way it kills them if you are making the trap yourself, which is probably hard if you don't know what you are doing.

There are The Giant electric traps already in the mod tools that you can just use, look up a youtube video for it.
broken avatar :(
×
broken avatar :(
Location: nlLimburg
Date Registered: 1 February 2014
Last active: 4 years ago
Posts
5
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
Mr_BlackOP's Groups
Mr_BlackOP's Contact & Social LinksturbojarnoMr_BlackOPturbojarnoYouTube
yea i just want to use the prefab but i cant find any vids on how to make them work, it just gives me a message that says: "not available"
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 4 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Signature
Donate to me if you enjoy my work. https://www.paypal.me/thezombiekilla6
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social LinksMrZ0mbiesFanaticdust103194MrZ0mbiesFanatic
yea i just want to use the prefab but i cant find any vids on how to make them work, it just gives me a message that says: "not available"

You need to include the scripts.

Open up your mapname.gsc and where it has the #using lines at the top, add this line under them all
Code Snippet
Plaintext
#using scripts\zm\_zm_trap_electric;

Underneath that paste these lines
Code Snippet
Plaintext
//Trap
#precache( "fx", "dlc0/factory/fx_elec_trap_factory" );
#precache( "fx", "maps/zombie/fx_zombie_light_glow_green" );
#precache( "fx", "maps/zombie/fx_zombie_light_glow_red" );
#precache( "fx", "fx_zombie_light_elec_room_on" );
#precache( "fx", "zombie/fx_elec_player_md_zmb" );
#precache( "fx", "zombie/fx_elec_player_sm_zmb" );
#precache( "fx", "zombie/fx_elec_player_torso_zmb" );
#precache( "fx", "electric/fx_elec_sparks_burst_sm_circuit_os" );
#precache( "fx", "electric/fx_elec_sparks_burst_sm_circuit_os" );
#precache( "fx", "zombie/fx_powerup_on_green_zmb" );

Now at the bottom put this function
Code Snippet
Plaintext
function precache_fx()
{
level._effect["zapper"] = "dlc0/factory/fx_elec_trap_factory";
level._effect["zapper_light_ready"] = "maps/zombie/fx_zombie_light_glow_green";
level._effect["zapper_light_notready"] = "maps/zombie/fx_zombie_light_glow_red";
level._effect["elec_room_on"] = "fx_zombie_light_elec_room_on";
level._effect["elec_md"] = "zombie/fx_elec_player_md_zmb";
level._effect["elec_sm"] = "zombie/fx_elec_player_sm_zmb";
level._effect["elec_torso"] = "zombie/fx_elec_player_torso_zmb";
}

and at the top in the main() function put this line
Code Snippet
Plaintext
precache_fx();

Do these exact same steps in your mapname.csc, except where it says
Code Snippet
Plaintext
#precache( "fx"
change it to
Code Snippet
Plaintext
#precache( "client_fx"

and then in launcher right click on your map, and click "Edit Zone File", and paste this at the bottom
Code Snippet
Plaintext
scriptparsetree,scripts/zm/_zm_trap_electric.gsc

Now the script should be included properly.
broken avatar :(
×
broken avatar :(
Location: nlLimburg
Date Registered: 1 February 2014
Last active: 4 years ago
Posts
5
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
Mr_BlackOP's Groups
Mr_BlackOP's Contact & Social LinksturbojarnoMr_BlackOPturbojarnoYouTube
hm i tried and its still not working :/
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
Forum Rank
Immortal
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
If you want scripts / features made for you, then contact me by PM or email / skype etc
it will cost you tho so if you have no intention of reciprocating don't even waste my time ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social Links[email protected]HarryBo21HarryBo000
You don't need to add the "using" line coz it's already called in user maps gsc

And it has a csc too and the fx also needs precaching in csc... 

You also do not need to add it to zone..
Last Edit: October 17, 2016, 06:49:03 am by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: nlLimburg
Date Registered: 1 February 2014
Last active: 4 years ago
Posts
5
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
Mr_BlackOP's Groups
Mr_BlackOP's Contact & Social LinksturbojarnoMr_BlackOPturbojarnoYouTube
Okay so i just had to make the the script_flag_wait the same as the zone i was in. It works now and ty to Dust i have the visual effects aswell. Problem solved
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
anybody there have a question?

 
Loading ...