

Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
This is it, I believe I used a tutorial from ADDICTED on ZM: Code SnippetPlaintext#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
init()
{
wait 1;
// Below is an example.
//thread add_zapper("zapper1", 1500, "enter_zone3");
thread add_zapper("zapper1", 1000, "enter_zone1");
thread add_zapper("zapper2", 1000, "enter_zone5");
}
add_zapper(zapper_name, cost, flag)
{
triggers = getentarray(zapper_name + "_trigger", "targetname");
handles = getentarray(zapper_name + "_handle", "targetname");
lights = getentarray(zapper_name + "_light", "targetname");
damage_trigs = getentarray(zapper_name + "_damage", "targetname");
fx_structs = getentarray(zapper_name + "_struct", "targetname");
if(!isDefined(cost))
cost = 1000;
triggers wait_for_power(cost);
if(isDefined(flag))
{
triggers handle_zapper_trigs(handles, "disable");
zapper_light_red( lights );
flag_wait( flag );
triggers handle_zapper_trigs(handles, "enable");
}
zapper_light_green( lights );
while(1)
{
wait 0.01;
player = undefined;
notifier_struct = spawnStruct();
for(i=0;i<triggers.size;i++)
{
triggers[i] thread wait_until_zapper_trigged(notifier_struct);
}
notifier_struct waittill("trigger", player);
notifier_struct delete();
if( player.score < cost )
{
play_sound_at_pos( "no_purchase", player.origin );
continue;
}
play_sound_at_pos( "purchase", player.origin );
player maps\_zombiemode_score::minus_to_player_score( cost );
triggers handle_zapper_trigs(handles, "disable");
wait 0.7;
zapper_light_red( lights );
array_thread(fx_structs,::zapperFx,zapper_name);
damage_trigs do_damage(zapper_name);
wait 25;
level notify(zapper_name + "_end");
wait 25;
triggers handle_zapper_trigs(handles, "enable");
zapper_light_green( lights );
wait 0.7;
}
}
do_damage(name)
{
for(i=0;i<self.size;i++)
self[i] thread barrier_do_damage(name);
}
barrier_do_damage(name)
{
level endon(name + "_end");
while(1)
{
self waittill("trigger",who);
if(isplayer(who) )
{
who thread maps\dlc3_code::player_elec_damage();
}
else
{
who thread maps\dlc3_code::zombie_elec_death( randomint(100) );
}
wait 0;
}
}
zapperFx(name)
{
self.tag_origin = spawn("script_model",self.origin);
self.tag_origin setmodel("tag_origin");
playfxontag(level._effect["zapper"],self.tag_origin,"tag_origin");
self.tag_origin playsound("elec_start");
self.tag_origin playloopsound("elec_loop");
self thread play_electrical_sound();
level waittill(name + "_end");
for(i=0;i<self.size;i++)
{
self.tag_origin stoploopsound();
self notify ("arc_done");
self.tag_origin delete();
}
}
play_electrical_sound()
{
self endon ("arc_done");
while(1)
{
wait(randomfloatrange(0.1, 0.5));
playsoundatposition("elec_arc", self.origin);
}
}
handle_zapper_trigs(handles, type)
{
for(i=0;i<self.size;i++)
{
if(type == "disable")
self[i] disable_trigger();
else if(type == "enable")
self[i] enable_trigger();
}
for(i=0;i<handles.size;i++)
{
if(type == "disable")
handles[i] disable_zapper_switch();
else if(type == "enable")
handles[i] enable_zapper_switch();
}
}
zapper_light_red( zapper_lights )
{
for(i=0;i<zapper_lights.size;i++)
{
zapper_lights[i] setmodel("zombie_zapper_cagelight_red");
if(isDefined(zapper_lights[i].fx))
{
zapper_lights[i].fx delete();
}
zapper_lights[i].fx = maps\_zombiemode_net::network_safe_spawn( "trap_light_red", 2, "script_model", zapper_lights[i].origin );
zapper_lights[i].fx setmodel("tag_origin");
zapper_lights[i].fx.angles = zapper_lights[i].angles+(-90,0,0);
playfxontag(level._effect["zapper_light_notready"],zapper_lights[i].fx,"tag_origin");
}
}
zapper_light_green( zapper_lights )
{
for(i=0;i<zapper_lights.size;i++)
{
zapper_lights[i] setmodel("zombie_zapper_cagelight_green");
if(isDefined(zapper_lights[i].fx))
{
zapper_lights[i].fx delete();
}
zapper_lights[i].fx = maps\_zombiemode_net::network_safe_spawn( "trap_light_green", 2, "script_model", zapper_lights[i].origin );
zapper_lights[i].fx setmodel("tag_origin");
zapper_lights[i].fx.angles = zapper_lights[i].angles+(-90,0,0);
playfxontag(level._effect["zapper_light_ready"],zapper_lights[i].fx,"tag_origin");
}
}
wait_for_power(cost)
{
for(i=0;i<self.size;i++)
{
self[i] SetHintString( &"ZOMBIE_FLAMES_UNAVAILABLE" );
self[i] SetCursorHint( "HINT_NOICON" );
}
flag_wait( "electricity_on" );
for(i=0;i<self.size;i++)
self[i] SetHintString( "Press & hold &&1 to activate the electric barrier [Cost: "+cost+"]" );
}
enable_zapper_switch()
{
self rotatepitch(-180,.5);
self playsound("switch_flip");
}
disable_zapper_switch()
{
self rotatepitch(180,.5);
self playsound("switch_flip");
}
wait_until_zapper_trigged(struct)
{
self waittill("trigger", who);
struct notify("trigger", who);
}
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() Oil Rig Beta Access |
the error cannot be coming from this
"j_head" isnt referenced at all in this entire thing
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
I also checked zombie_elec_death function in dlc3_code and there was no j_head eitherI have no idea where else to look
who thread maps\dlc3_code::player_elec_damage();
}
else
{
who thread maps\dlc3_code::zombie_elec_death( randomint(100) );
who thread maps\dlc3_code::zombie_elec_death( randomint(100) );
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() Oil Rig Beta Access |
at a guess, its coming from one of these Code SnippetPlaintextwho thread maps\dlc3_code::player_elec_damage();
}
else
{
who thread maps\dlc3_code::zombie_elec_death( randomint(100) );
but, those are stock, so still indicates a problem with these models, rather than your code
find and post this : Code SnippetPlaintextwho thread maps\dlc3_code::zombie_elec_death( randomint(100) );
so we can take a look
zombie_elec_death(flame_chance)
{
self endon("death");
//10% chance the zombie will burn, a max of 6 burning zombs can be goign at once
//otherwise the zombie just gibs and dies
if(flame_chance > 90 && level.burning_zombies.size < 6)
{
level.burning_zombies[level.burning_zombies.size] = self;
self thread zombie_flame_watch();
self playsound("ignite");
self thread animscripts\death::flame_death_fx();
wait(randomfloat(1.25));
}
else
{
refs[0] = "guts";
refs[1] = "right_arm";
refs[2] = "left_arm";
refs[3] = "right_leg";
refs[4] = "left_leg";
refs[5] = "no_legs";
refs[6] = "head";
self.a.gib_ref = refs[randomint(refs.size)];
playsoundatposition("zombie_arc", self.origin);
if( !self enemy_is_dog() && randomint(100) > 50 )
{
self thread electroctute_death_fx();
self thread play_elec_vocals();
}
wait(randomfloat(1.25));
self playsound("zombie_arc");
}
self dodamage(self.health + 666, self.origin);
iprintlnbold("should be damaged");
}
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
For some reason all my colors are weird and rainbow colored......not sure if i need to change something in the textures or move the files to a different location. Any help would be appreciated
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
I am using script placer z and whenever I replace the localized and/or the patch the ingame perks and shaders are invisible and the zombies seem to be fine...
someone help
It will be ready on Friday or earlier.
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
no shangri la hehe
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
when i drag the contents into my maps appropriate folder, rename the file as advised, the zombies spawn as the default actor. any help??
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |