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

Gave a zombie any gun you want and have him chase and shoot you and add xanima

broken avatar :(
Created 7 years ago
by AllMoDs
0 Members and 1 Guest are viewing this topic.
2,883 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 22 September 2015
Last active: 2 days ago
Posts
256
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
My Contact & Social Links
More
Signature
×
AllMoDs's Groups
creds not shore

anima update added




hope this helps.  every thing else i found on the net didn't work at all
so i got this working after lots of testing and game crashes

sorry for spelling and crappy looking tut
1st
thread maps\zub_spawn_freeze::freeze_init();
add that in _zombiemode.gsc
under this part
Spoiler: click to open...
maps\_zombiemode_blockers_new::init();
   maps\_zombiemode_spawner::init();
   maps\_zombiemode_powerups::init();
   maps\_zombiemode_radio::init();   
   maps\_zombiemode_perks::init();
   //maps\_zombiemode_dogs::init();
   maps\_zombiemode_bowie::bowie_init();
   maps\_zombiemode_cymbal_monkey::init();
   maps\_zombiemode_betty::init();
   maps\_zombiemode_timer::init();
   maps\_zombiemode_auto_turret::init();
like this
Spoiler: click to open...
maps\_zombiemode_blockers_new::init();
   maps\_zombiemode_spawner::init();
   maps\_zombiemode_powerups::init();
   maps\_zombiemode_radio::init();   
   maps\_zombiemode_perks::init();
   //maps\_zombiemode_dogs::init();
   maps\_zombiemode_bowie::bowie_init();
   maps\_zombiemode_cymbal_monkey::init();
   maps\_zombiemode_betty::init();
   maps\_zombiemode_timer::init();
   maps\_zombiemode_auto_turret::init();
   thread maps\zub_spawn_freeze::freeze_init(); // see here


put that in your mods/yourmapname/maps

TO ADD I NEW GUN CHANG EVERY WHERE ray_gun IS WITH YOUR GUN
guns must have this on it or you will get a error
http://prntscr.com/dn9lsy

in radiant select your zombie model hit n on keyboard and put this

the targetname & freeze_boss part hit enter


there are notes in the gsc that will help you make it more custom to how you want ai to do things

this runs when the zombe shoots how fast shoot and more
Spoiler: click to open...
zombdoshoot()

{

   self endon( "death" );

   for(;;)

   {
      
      self notify( "zombie_acquire_enemy" );
      
      close_zombie = get_closest_valid_player( self.origin, true );
      
      close_zombie.favoriteenemy = self;

      lockspot = close_zombie gettagorigin("b_c_head");
      
      //if (distance(self.origin, close_zombie.origin) < 1000 ) // Checks if there is a known enemy in distance for my boss if [true] shoot
      //if(self CanSee(close_zombie)) //shots you if mele range
      if ( self IsKnownEnemyInRadius( self.origin, 400 ) ) // Checks if there is a known enemy in a radius from my boss if [true]  dus not shoot teal yore out of Radius
      {
         
         self SetLookAt( lockspot, 0.05 );
         self AimAtPos( lockspot, 0.09 );
         self shoot(5.1);
         self notify( "zombie_acquire_enemy" );
      }

      else

      {

         self SetLookAt( lockspot, 0.05 );

         self AimAtPos( lockspot, 0.09 );
      
         self SetRunToPos( close_zombie.origin );
         self notify( "zombie_acquire_enemy" );

      }

   wait (randomfloatrange(0.2, 1.1)); // how often ai shoots

   }

}


look for this in the gsc pick 1 thats gives what you want 
Spoiler: click to open...
//if (distance(self.origin, close_zombie.origin) < 1000 ) // Checks if there is a known enemy in distance for my boss if [true] shoot
      //if(self CanSee(close_zombie)) //shots you if melee range
      if ( self IsKnownEnemyInRadius( self.origin, 400 ) ) // Checks if there is a known enemy in a radius from my boss if [true]  dus not shoot teal yore out of Radius


 if ( self IsKnownEnemyInRadius( self.origin, 400 ) )   if used 400 can be changed
if you don't use this method take it out and use a diff one remove // from in front of the if to use diff one




thats when the ai will shoot  and what to do when not shooting  the 5.1 in this self shoot(5.1); is the accuracy of the ai 5.1 is a allways hit you in the head allmost every time
Spoiler: click to open...
if ( self IsKnownEnemyInRadius( self.origin, 400 ) ) // Checks if there is a known enemy in a radius from my boss if [true]  dus not shoot teal yore out of Radius
      {
         
         self SetLookAt( lockspot, 0.05 );
         self AimAtPos( lockspot, 0.09 );
         self shoot(5.1);
         self notify( "zombie_acquire_enemy" );
      }

      else

      {

         self SetLookAt( lockspot, 0.05 );

         self AimAtPos( lockspot, 0.09 );
      
         self SetRunToPos( close_zombie.origin );
         self notify( "zombie_acquire_enemy" );

      }

you can add what ever you want in this part like anima or what ever when shooting or not

if you use as is the zombie shoots at you if more then 400 dis from him and walks to you if your in the 400 dis
so make the 400 lower and you can add what you want him to do if your in range here
self SetRunToPos( close_zombie.origin );
replace it with whet you want him to do or thread somthing new


you can set custom model for zombie  in this gsc to

compile your map and dun



if you like to add custom zombie xanima easy


put that in your mods/yourmapname

make your xanima convert it
open generic_human.atr you just put in maps folder

look for this line
ai_zombie_crawl_jump_down_189
add the name of the  new anima  you just made under here
i put this in front off all mine
ai_zombie_


add this in mod.csv
xanim,new anima name
like this
ai_zombie_jump_shot


put this in the zub_spawn_freeze.gsc
ON WHERE YOU WANT ANIMA TO PLAY

Spoiler: click to open...
self trowrocks();
Spoiler: click to open...
trowrocks()
{
   traverseData = [];
   
   traverseData[ "traverseAnim" ]         = %YOUR ANIMA NAME;  //SEE THIS

   DoTraverse( traverseData );
}
add it like this  if you add it before he shoots anima will play out b4 he shoots
if you and self trowrocks(); where self SetRunToPos( close_zombie.origin ); is he will do anima when in rang you set where the 400 is here
      if ( self IsKnownEnemyInRadius( self.origin, 400 ) ) // Checks if there is a known enemy in a radius from my boss if [true]  dus not shoot teal yore out of Radius




i put in both here for a mod im helping a friend with
Spoiler: click to open...
zombshoot2()

{

   self endon( "death" );

   for(;;)

   {
      
      self notify( "zombie_acquire_enemy" );
      
      close_zombie = get_closest_valid_player( self.origin, true );
      
      close_zombie.favoriteenemy = self;

      hitLoc = close_zombie gettagorigin("b_c_head");
      
      //if (distance(self.origin, close_zombie.origin) < 1000 ) // Checks if there is a known enemy in distance for my boss if [true] shoot
      if ( self IsKnownEnemyInRadius( self.origin, 50 ) ) // Checks if there is a known enemy in a radius for my boss if [true]  dus not shoot teal yore out of Radius
      //if(self CanSee(close_zombie)) //shots you if mele range
      {
         
         self SetLookAt( hitLoc, 0.05 ); // works same puting close_zombie and not hitLoc
         self AimAtPos( hitLoc, 0.09 );
         
         self trowrocks();
         self shoot(5.1);
         self notify( "zombie_acquire_enemy" );
      }

      else

      {

         self SetLookAt( hitLoc, 0.05 );

         self AimAtPos( hitLoc, 0.09 );
      
         
         self trowrocks();
         self notify( "zombie_acquire_enemy" );

      }

   wait (randomfloatrange(0.2, 1.1));

   }

}

trowrocks()
{
   traverseData = [];
   
   traverseData[ "traverseAnim" ]         = %YOUR ANIMA NAME;  // SEE THIS

   DoTraverse( traverseData );
}
vid of anima working

Double Post Merge: December 24, 2016, 12:08:31 am
added xanima update to tut

compile your map and dun
Last Edit: December 31, 2016, 03:52:44 pm by AllMoDs
broken avatar :(
×
broken avatar :(
Location: usAustria
Date Registered: 5 August 2016
Last active: 4 years ago
Posts
76
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
ColdShrimp2's Groups
ColdShrimp2's Contact & Social Links
Your image does not work

 
Loading ...