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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - fanmagic

Hey man so I finally got to adding the script and:
1. when i spawn i get a fire screen overlay effect
2. zombies don't target me
3. I don;t spawn in with as many points as i should and when I kill zombies the points don;t collect

Was just wondering how I could fix this, again wanted to thank you for what u had already helped me with.
Most of the bugs you've got doesn't come from my script. You have to let the boss spawn behind a wallhop, if you have windows on your map.
And the fire screen appears, because the script can't find the zombie itself, so you maybe did something wrong.
6 years ago
It is possible. Just change the model in these files
Code Snippet
Plaintext
char_zomb_player_0.gsc
char_zomb_player_1.gsc
char_zomb_player_2.gsc
char_zomb_player_3.gsc
and
 
Code Snippet
Plaintext
char_zomb_player_0.csv
char_zomb_player_1.csv
char_zomb_player_2.csv
char_zomb_player_3.csv
But some of the sp models doesn't work well. You will notice that some of the player models are rotated in 90°, maybe.
6 years ago
So would i download your older version, install it, and then replace the .gsc with this?
It's the same code as the one from the download. Just replace the function like i wrote above.
6 years ago
Yes. You are able to change everything like speed, health, model, fx and so on. I'm not at home, so i'll post the script later on here. (to spawn the zombie in the arena)
If you want the boss to spawn after you activate a trigger, you can use something like this:
Code Snippet
Plaintext
 napalm_spawn_cycle()
{
trig = getEnt("boss_trigger","targetname");

trig waittill("trigger" );
thread spawn_napalm();

}
6 years ago
I think I still see the line of code which is causing the problem.

in
Code Snippet
Plaintext
check_for_near_players(zombie, damage)
scroll down to

Code Snippet
Plaintext
if(self.health>damage) self DoDamage( damage, self.origin, zombie, zombie );
The "self" in this function is the player and when the player's health is very low it will activate the singleplayer's defeat.
I were you I should change "self" to "zombie" or change DoDamage to RadiusDamage. I think don't think I have to explain it further.  :)
I just use doDamage if the player's health is bigger than the damage. If the player has less health the else-statement uses radiusDamage to kill the player and prevant the singleplayer restart. But i havn't tested the script that much in coop, so you could be right. :)


Double Post Merge: February 27, 2018, 10:14:08 pm
I know you posted it here for all to see but seeing as how you created it I figured it was only right to ask permission to use it. Would you mind?  :)
You can use it. Just give credits to everyone ;)
6 years ago
sorry im really new to scripting, How would I do that?
I will do it for you, when im at home. :)
6 years ago
Thanks a lot :)

Double Post Merge: February 26, 2018, 10:08:42 pm
Hey, im really sorry to bother you again but how would i make them despawn if i leave a zone, like im in one zone, teleport to another and the zombies would teleport or respawn in the current zone.
Maybe you could kill them instead of respawning?
6 years ago
I remember there was something wrong with this napalm mod. Does the napalm zombie deal correctly radiusDamage instead of doDamage, if you are going to use the napalm explosion?
Code Snippet
Plaintext
#include maps\_utility; 
#include common_scripts\utility;
#include maps\_zombiemode_utility;

init()
{
flag_wait( "all_players_connected" );
wait(2);
thread napalm_spawn_cycle();
}

napalm_spawn_cycle()
{
level.napalm = 0;
level.next_napalm = 6;
while(1)
{
level waittill("between_round_over");
level.napalm++;
if( level.napalm == level.next_napalm )
{
//iPrintLNBold("SPAWN_NAPALM");
thread spawn_napalm();
level.napalm = 0;
}
wait (.5);
}
}

spawn_napalm()
{
level endon("boss_killed");

    damage = 20;
    distancehurt = 200;
boss = GetEnt("napalmboss", "targetname");
zombie = spawn_zombie( boss );
zombie.is_boss = true;
    zombie.zombie_move_speed = "walk";
zombie.animname = "zombie";
zombie.health = 10000;
zombie.maxhealth = 10000;
zombie.gibbed = true;
zombie thread check_for_explosion();
zombie thread check_for_running();
zombie thread play_fire_fx();

players = getplayers();
for(i=0;i<players.size;i++)
{
players[i] thread check_for_near_players(zombie, damage);
}
while(1)
{
array_thread( players,::BurnThem,zombie,damage,distancehurt );
wait (1);
}
}

play_fire_fx()
{
level endon("boss_killed");

while(1)
{
fxTag = "j_neck";
PlayFxOnTag( level._effect["napalm_head"], self, fxTag );
wait 1;
}
}

check_for_near_players(zombie, damage)
{
level endon("boss_killed");

near_player_time = 0;

damage = damage * 2;

while(1)
{
if(is_player_valid( self ) & Distance( self.origin,zombie.origin )<50)
{
if(near_player_time == 5)
{
zombie dodamage( zombie.health + 666, zombie.origin );
if(self.health>damage) self DoDamage( damage, self.origin, zombie, zombie );
else radiusdamage(self.origin, 20, damage, 5, zombie);

fx = Spawn( "script_model", self.origin );
fx SetModel( "tag_origin" );
playfxontag(level._effect["fx_explosion_charge_large"], fx, "tag_origin");
wait 3;
fx delete();
level notify("boss_killed");
}
near_player_time++;
//iPrintLN(near_player_time);
}
wait(1);
}
}

check_for_explosion()
{
//iPrintLNBold("Check explosion");

level endon("boss_killed");

while(1)
{
if(self.health < 0)
{
fx = Spawn( "script_model", self.origin );
fx SetModel( "tag_origin" );
playfxontag(level._effect["fx_explosion_charge_large"], fx, "tag_origin");
wait 3;
fx delete();
level notify("boss_killed");
}
wait(1);
}
}

check_for_running()
{
//iPrintLNBold("Check run speed");

level endon("boss_killed");

while(IsAlive( self ))
{
if(self.health < self.maxhealth)
{
var = randomintrange(1, 4);
self set_run_anim( "sprint" + var );                       
self.run_combatanim = level.scr_anim[self.animname]["sprint" + var];
//iPrintLNBold("Sprint");
wait (10);       
self set_run_anim( "walk" + var );                         
self.run_combatanim = level.scr_anim[self.animname]["walk" + var];
//iPrintLNBold("Walk");
self.maxhealth = self.health;
}
wait(1);
}
}

BurnThem(zombie,damage,distancehurt)
{
    zombie endon("death");

ai = GetAISpeciesArray( "axis", "all");
for( i = 0; i < ai.size; i++ )
{
if (distance (ai[i].origin, zombie.origin) < 200 && ai[i].is_boss == false)
{
ai[i] dodamage( damage, ai[i].origin );
}
}

if(is_player_valid( self ) & Distance( self.origin,zombie.origin )<distancehurt)
{
self SetBurn( 1 );

if(self.health>damage) self DoDamage( damage, self.origin, zombie, zombie );
else radiusdamage(self.origin, distancehurt, damage, 5, zombie);
}
}
I think that i corrected it a while ago. Can you tell me exectly what lines of code you are talking about, if the mistake is still there?  ::)
6 years ago
Search for start_zone and paste your zones under it like i did above.
6 years ago
If you want the zombies to spawn only in the zone you are currently in, you just need to add the zones like this:
Code Snippet
Plaintext
 zones = [];
zones[ zones.size ] = "start_zone" ;
zones[ zones.size ] = "zone2" ;
With this method you don't need to use script_flags. Just use doors to block the player from touching the zones you don't wont to be active.
6 years ago
That would be very much appreciated. Im assuming i would be able to edit things like the model and movement speed correct?

Double Post Merge: February 26, 2018, 08:42:13 pm
Basically, I would need it to spawn in a specific zone when it is activated. In my case the zone is called zone_boss but is activated with script_flag/enter_zone_boss... again thanks alot :)
Yes. You are able to change everything like speed, health, model, fx and so on. I'm not at home, so i'll post the script later on here. (to spawn the zombie in the arena)
6 years ago
If you like to use my boss zombie, i could change the script for you, so that its compatible with your idea. :)
https://www.ugx-mods.com/forum/scripts/55/fms-napalm-zombie/15400/
6 years ago
I'll look into my ported stuff and see if i have the weapon for you.
6 years ago
Make sure that you followed the tutorial correctly and that you have placed every radiant stuff with correct kvp's.
6 years ago
Loading ...