07-11-2013, 07:21 AM
(This post was last modified: 10-14-2020, 03:12 AM by eplipswich.)
Since the download links to Zack in this thread are all dead, I figure I would revive the 0.91 version of Zack by putting the download link below for those who are interested:
http://www.mediafire.com/?1zgrxvc9ucbnp7m
Also, I have created an AI for him as shown below. It's a pretty simple AI, but does enough justice
(Inspired by Shymeck's AIs). Feel free to improve on it if anyone wants.
http://www.mediafire.com/?1zgrxvc9ucbnp7m
Also, I have created an AI for him as shown below. It's a pretty simple AI, but does enough justice
(Inspired by Shymeck's AIs). Feel free to improve on it if anyone wants.Code:
int face_distance()
// distance to target, positive when faced towards it
// 80 pixels may be considered as a maximum distance allowing close combat
{
return ( self.x - target.x ) * ( 2 * ( self.facing ? 1 : 0 ) - 1 );
}
bool dist_between( int min, int max )
// checks whether distance to target is within bounds
{
return ( ( face_distance() < max ) && ( face_distance() > min ) );
}
bool z_axis_dist( int dist )
{
return ( abs( self.z - target.z ) <= dist ) ? true : false;
}
bool same_z_axis()
// checks whether our character is on the same z axis as the opponent
{
return ( abs( self.z - target.z ) <= 8 ) ? true : false;
}
int ego()
{
if( dist_between(150,200) && same_z_axis() && ( self.mp >= 200 ) && ( target.state != 14 ))
{
if( self.facing )
{
DlJ();
}
else
{
DrJ();
}
return 0;
}
if( dist_between(150,200) && ( self.mp >= 200 ) )
{
DuJ();
if (self.frame < 250)
{return 0;}
}
if( dist_between(100,180) && same_z_axis() && ( self.mp >= 80 ) )
{
if( self.facing )
{
DlA();
}
else
{
DrA();
}
return 0;
}
if( dist_between(180,275) && ( self.mp >= 75 ) && ( target.state != 14 ))
{
DdJ();
return 0;
}
return 0;
}
Chat
