



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!![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
Off topic, but that fx looks familiar
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
main()
{
flag_wait("all_players_connected");
level.max_frozen = 24;
level.max_freeze_distance = 300;
players = GetPlayers();
array_thread(players, ::weapon_fired);
}
weapon_fired()
{
self endon( "disconnect" );
self waittill( "spawned_player" );
for( ;; )
{
self waittill( "projectile_impact", weapon, impact );
if (weapon == "zombie_colt")
{
self thread impact_fx( impact );
}
}
}
impact_fx( impact )
{
level.bullet = spawn("script_model", impact);
level.bullet SetModel("tag_origin");
playfx( level._effect["ww"], level.bullet.origin + ( 0, 0, 40 ));
iprintlnbold("Play fx on tag");
zombs = GetAISpeciesArray( "axis", "all" );
get_AI = zombs;
close_zoms = get_array_of_closest( impact, get_AI, undefined, level.max_frozen, level.max_freeze_distance );
move_them = [];
for( i = 0; i < close_zoms.size; i++ )
{
if(IsDefined(close_zoms[i].in_the_ground) && close_zoms[i].in_the_ground == true)
{
close_zoms[i] super_kill();
continue;
}
move_them[i] = spawn("script_model", close_zoms[i].origin);
move_them[i] SetModel("tag_origin");
close_zoms[i] LinkTo( move_them[i] );
move_them[i] thread zombie_wobble();
close_zoms[i] thread kill_zoms();
}
wait (6);
for( i = 0; i < close_zoms.size; i++ )
{
close_zoms[i] unLink( move_them[i] );
move_them[i] delete();
}
level.bullet delete();
}
zombie_wobble()
{
while (isdefined(self))
{
self moveTo(level.bullet.origin, .5, .05, .05);
waittime = randomfloatrange(2.5, 5);
yaw = RandomInt( 360 );
if( yaw > 300 )
{
yaw = 300;
}
else if( yaw < 60 )
{
yaw = 60;
}
yaw = self.angles[1] + yaw;
self rotateto ((-60 + randomint(120), yaw, -45 + randomint(90)), waittime, waittime * 0.5, waittime * 0.5);
wait randomfloat (waittime - 0.1);
self thread kill_zoms();
}
}
kill_zoms()
{
wait(1.5);
self DoDamage( self.maxhealth+666, self.origin );
iprintlnbold("7 is Love. 7 is Life.");
self thread NotifyPlayersOnSpatter();
self hide();
thread GivePlayersScore(60);
wait(1.5);
}
super_kill()
{
self DoDamage( self.maxhealth+666, self.origin );
if(IsDefined(self.animname) && self.animname != "zombie_dog" || self.animname != "quad_zombie") {
self thread NotifyPlayersOnSpatter();
}
self hide();
thread GivePlayersScore(60);
}
blur_vision()
{
self SetBlur(10.3, 1);
wait(1);
self SetBlur(0, 1);
}
wait_for_bloodspatter() {
for(;;) {
// self iprintlnbold("Waiting for spatter notify");
self waittill("spatter", zomb);
if(DistanceSquared(zomb.origin, self.origin) <= 120000) {
self.spatter = 1;
// self iprintlnbold("Should splatter");
wait(1);
// self iprintlnbold("Splatter should be done");
self.splatter = 0;
}
else {
continue;
}
}
}
NotifyPlayersOnSpatter() {
players = GetPlayers();
for(i=0;i<players.size;i++) {
players[i] notify("spatter", self);
}
}
GivePlayersScore(score) {
players = GetPlayers();
for(i=0;i<players.size;i++) {
players[i] maps\_zombiemode_score::add_to_player_score(score*level.zombie_vars["zombie_point_scalar"]);
}
}
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
Delete your mod in appdata. Sometimes appdata doesnt get updated properly
Aye mate you don't know me so y don't you shut tf up ok buddy
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() Box Mappers Elite | |
![]() | Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
Everything works fine, but when i restart the map the fx is'nt playing on the impact point and my script to kill the zombies doesnt work anymore. It's only working correct when i start the map again with 'map' or 'devmap'. Is it possible to fix this isue?Spoiler: click to open... Code SnippetPlaintext#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
main()
{
flag_wait("all_players_connected");
level.max_frozen = 24;
level.max_freeze_distance = 300;
players = GetPlayers();
array_thread(players, ::weapon_fired);
}
weapon_fired()
{
self endon( "disconnect" );
self waittill( "spawned_player" );
for( ;; )
{
self waittill( "projectile_impact", weapon, impact );
if (weapon == "zombie_colt")
{
self thread impact_fx( impact );
}
}
}
impact_fx( impact )
{
level.bullet = spawn("script_model", impact);
level.bullet SetModel("tag_origin");
playfx( level._effect["ww"], level.bullet.origin + ( 0, 0, 40 ));
iprintlnbold("Play fx on tag");
zombs = GetAISpeciesArray( "axis", "all" );
get_AI = zombs;
close_zoms = get_array_of_closest( impact, get_AI, undefined, level.max_frozen, level.max_freeze_distance );
move_them = [];
for( i = 0; i < close_zoms.size; i++ )
{
if(IsDefined(close_zoms[i].in_the_ground) && close_zoms[i].in_the_ground == true)
{
close_zoms[i] super_kill();
continue;
}
move_them[i] = spawn("script_model", close_zoms[i].origin);
move_them[i] SetModel("tag_origin");
close_zoms[i] LinkTo( move_them[i] );
move_them[i] thread zombie_wobble();
close_zoms[i] thread kill_zoms();
}
wait (6);
for( i = 0; i < close_zoms.size; i++ )
{
close_zoms[i] unLink( move_them[i] );
move_them[i] delete();
}
level.bullet delete();
}
zombie_wobble()
{
while (isdefined(self))
{
self moveTo(level.bullet.origin, .5, .05, .05);
waittime = randomfloatrange(2.5, 5);
yaw = RandomInt( 360 );
if( yaw > 300 )
{
yaw = 300;
}
else if( yaw < 60 )
{
yaw = 60;
}
yaw = self.angles[1] + yaw;
self rotateto ((-60 + randomint(120), yaw, -45 + randomint(90)), waittime, waittime * 0.5, waittime * 0.5);
wait randomfloat (waittime - 0.1);
self thread kill_zoms();
}
}
kill_zoms()
{
wait(1.5);
self DoDamage( self.maxhealth+666, self.origin );
iprintlnbold("7 is Love. 7 is Life.");
self thread NotifyPlayersOnSpatter();
self hide();
thread GivePlayersScore(60);
wait(1.5);
}
super_kill()
{
self DoDamage( self.maxhealth+666, self.origin );
if(IsDefined(self.animname) && self.animname != "zombie_dog" || self.animname != "quad_zombie") {
self thread NotifyPlayersOnSpatter();
}
self hide();
thread GivePlayersScore(60);
}
blur_vision()
{
self SetBlur(10.3, 1);
wait(1);
self SetBlur(0, 1);
}
wait_for_bloodspatter() {
for(;;) {
// self iprintlnbold("Waiting for spatter notify");
self waittill("spatter", zomb);
if(DistanceSquared(zomb.origin, self.origin) <= 120000) {
self.spatter = 1;
// self iprintlnbold("Should splatter");
wait(1);
// self iprintlnbold("Splatter should be done");
self.splatter = 0;
}
else {
continue;
}
}
}
NotifyPlayersOnSpatter() {
players = GetPlayers();
for(i=0;i<players.size;i++) {
players[i] notify("spatter", self);
}
}
GivePlayersScore(score) {
players = GetPlayers();
for(i=0;i<players.size;i++) {
players[i] maps\_zombiemode_score::add_to_player_score(score*level.zombie_vars["zombie_point_scalar"]);
}
}[close]
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() Oil Rig Beta Access |
self waittill( "spawned_player" );
Ideally instead of doing array thread you should set up 3 functions to wait for the player to connect and another to wait for the player to spawn, and one to wait for the player to fire, you should take a look at the Tesla script to see how it's done there.