04-03-2011, 10:01
Well, surtek gave me the idea yesterday, here it is:
You can add much more chickens, is just copy and paste, adding explosions and damage is very easy.
If you dont have, add:
You can add much more chickens, is just copy and paste, adding explosions and damage is very easy.
Code:
ChickenLittle()
{
self endon("death");
for(;;)
{
vec = anglestoforward(self getPlayerAngles()); end = (vec[0] * 200000, vec[1] * 200000, vec[2] * 200000);
loc = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+end, 0, self )[ "position" ];
begin = self gettagorigin("tag_eye");
self waittill ( "weapon_fired" );
Bird = spawn("script_model", self.origin );
Bird setModel( "toy_chicken_black_white" );
Bird.destructible_type = "toy_chicken_black_white";
Bird common_scripts\_destructible::setup_destructibles();
Bird MoveTo(getCursorPos(),14);
Bird2 = spawn("script_model", self.origin+(0,50,0) );
Bird2 setModel( "toy_chicken_black_white" );
Bird2.destructible_type = "toy_chicken_black_white";
Bird2 common_scripts\_destructible::setup_destructibles();
Bird2 MoveTo(getCursorPos()+(0,50,0),12);
Bird3 = spawn("script_model", self.origin+(0,-50,0) );
Bird3 setModel( "toy_chicken_black_white" );
Bird3.destructible_type = "toy_chicken_black_white";
Bird3 common_scripts\_destructible::setup_destructibles();
Bird3 MoveTo(getCursorPos()+(0,50,0),12);
Bird4 = spawn("script_model", self.origin+(50,0,0) );
Bird4 setModel( "toy_chicken_black_white" );
Bird4.destructible_type = "toy_chicken_black_white";
Bird4 common_scripts\_destructible::setup_destructibles();
Bird4 MoveTo(getCursorPos()+(0,50,0),15);
Bird5 = spawn("script_model", self.origin+(50,50,0) );
Bird5 setModel( "toy_chicken_black_white" );
Bird5.destructible_type = "toy_chicken_black_white";
Bird5 common_scripts\_destructible::setup_destructibles();
Bird5 MoveTo(getCursorPos()+(0,50,0),14);
Bird6 = spawn("script_model", self.origin+(50,-50,0) );
Bird6 setModel( "toy_chicken_black_white" );
Bird6.destructible_type = "toy_chicken_black_white";
Bird6 common_scripts\_destructible::setup_destructibles();
Bird6 MoveTo(getCursorPos()+(50,-50,0),14);
Bird7 = spawn("script_model", self.origin+(100,0,0) );
Bird7 setModel( "toy_chicken_black_white" );
Bird7.destructible_type = "toy_chicken_black_white";
Bird7 common_scripts\_destructible::setup_destructibles();
Bird7 MoveTo(getCursorPos()+(100,0,0),15);
Bird8 = spawn("script_model", self.origin+(100,50,0) );
Bird8 setModel( "toy_chicken_black_white" );
Bird8.destructible_type = "toy_chicken_black_white";
Bird8 common_scripts\_destructible::setup_destructibles();
Bird8 MoveTo(getCursorPos()+(100,50,0),15);
Bird9 = spawn("script_model", self.origin+(100,-50,0) );
Bird9 setModel( "toy_chicken_black_white" );
Bird9.destructible_type = "toy_chicken_black_white";
Bird9 common_scripts\_destructible::setup_destructibles();
Bird9 MoveTo(getCursorPos()+(100,-50,0),15);
self playLocalSound( "nuke_music" );
Bird.angles = self.angles;
Bird2.angles = self.angles;
Bird3.angles = self.angles;
Bird4.angles = self.angles;
Bird5.angles = self.angles;
Bird6.angles = self.angles;
Bird7.angles = self.angles;
Bird8.angles = self.angles;
Bird9.angles = self.angles;
wait 16;
Bird delete();
Bird2 delete();
Bird3 delete();
Bird4 delete();
Bird5 delete();
Bird6 delete();
Bird7 delete();
Bird8 delete();
Bird9 delete();
}
}
If you dont have, add:
Code:
getCursorPos()
{
forward = self getTagOrigin("j_head");
end = self thread vector_scal(anglestoforward(self getPlayerAngles()),1000000);
Crosshair = BulletTrace( forward, end, 0, self )[ "position" ];
return Crosshair;
}
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}