Posts
167
Respect
44Add +1
Forum Rank
Pack-a-Puncher
Primary Group
Member
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!find_flesh()
{
self endon( "death" );
level endon( "intermission" );
self endon( "stop_find_flesh" );
if( level.intermission )
{
return;
}
self.helitarget = true;
self.ignoreme = false;
self.noDodgeMove = true;
self.ignore_player = [];
self zombie_history( "find flesh -> start" );
self.goalradius = 32;
while( 1 )
{
near_zombies = getaiarray("axis");
same_enemy_count = 0;
for (i = 0; i < near_zombies.size; i++)
{
if ( isdefined( near_zombies[i] ) && isalive( near_zombies[i] ) )
{
if ( isdefined( near_zombies[i].favoriteenemy ) && isdefined( self.favoriteenemy )
&& near_zombies[i].favoriteenemy == self.favoriteenemy )
{
if ( distancesquared( near_zombies[i].origin, self.favoriteenemy.origin ) < 225 * 225
&& distancesquared( near_zombies[i].origin, self.origin ) > 525 * 525)
{
same_enemy_count++;
}
}
}
}
if (same_enemy_count > 12)
{
self.ignore_player[self.ignore_player.size] = self.favoriteenemy;
}
if (isDefined(level.zombieTheaterTeleporterSeekLogicFunc) )
{
self [[ level.zombieTheaterTeleporterSeekLogicFunc ]]();
}
zombie_poi = self get_zombie_point_of_interest( self.origin );
players = get_players();
if( players.size == 1 )
{
self.ignore_player = [];
}
else
{
for(i = 0; i < self.ignore_player.size; i++)
{
if( IsDefined( self.ignore_player[i] ) && IsDefined( self.ignore_player[i].ignore_counter ) && self.ignore_player[i].ignore_counter > 3 )
{
self.ignore_player[i].ignore_counter = 0;
self.ignore_player = array_remove( self.ignore_player, self.ignore_player[i] );
}
}
}
player = get_closest_valid_player( self.origin, self.ignore_player );
if( !isDefined( player ) && !isDefined( zombie_poi ) )
{
self zombie_history( "find flesh -> can't find player, continue" );
if( IsDefined( self.ignore_player ) )
{
self.ignore_player = [];
}
wait( 1 );
continue;
}
//if ( !isDefined( level.check_for_alternate_poi ) || ![[level.check_for_alternate_poi]]() )
{
self.enemyoverride = zombie_poi;
self.favoriteenemy = player;
}
self thread zombie_pathing();
if( players.size > 1 )
{
for(i = 0; i < self.ignore_player.size; i++)
{
if( IsDefined( self.ignore_player[i] ) )
{
if( !IsDefined( self.ignore_player[i].ignore_counter ) )
self.ignore_player[i].ignore_counter = 0;
else
self.ignore_player[i].ignore_counter += 1;
}
}
}
self thread attractors_generated_listener();
self.zombie_path_timer = GetTime() + ( RandomFloatRange( 1, 3 ) * 1000 );
while( GetTime() < self.zombie_path_timer )
{
wait( 0.1 );
}
self notify( "path_timer_done" );
self zombie_history( "find flesh -> bottom of loop" );
debug_print( "Zombie is re-acquiring enemy, ending breadcrumb search" );
self notify( "zombie_acquire_enemy" );
}
}


![]() | 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 think it is networking related, as the white player is always the host if i am not mistaken
i feel like this is because in every check in an array of players, player 0 ( white ) is always first. if there are checks that just go through who ever passes first, white player will always be checked first so he might always pass first. idk just a thought
![]() | 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 think it is networking related, as the white player is always the host if i am not mistaken
players = get_players();
players = array_randomize( players );players = get_players();
if ( !isDefined( players ) || players.size < 1 )
return;
players = array_randomize( players );
![]() | 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. |
The reason is simple... its the for statements. It does player 0 first, then 1 then 2 etc.
I said this already 3 comments above yours