07-23-2013, 13:02
Hello
I was working on how to shoot magicbullets from ac130, but it doesn't work :/
The modified _ac130.gsc
Can anyone help please, thanks
I was working on how to shoot magicbullets from ac130, but it doesn't work :/
The modified _ac130.gsc
Code:
weaponFiredThread()
{
self endon ( "ac130player_removed" );
for(;;)
{
self waittill( "weapon_fired" );
ForwardTrace = Bullettrace(level.ac130 gettagorigin("tag_player"), level.ac130 getTagOrigin("tag_player") + vector_multiply(anglestoforward(self getplayerangles()), 100000), true, self)[ "position" ];
MagicBullet("remotemissile_projectile_mp", level.ac130 gettagorigin("tag_player"), ForwardTrace, false, self);
weapon = self getCurrentWeapon();
if ( weapon == "ac130_105mm_mp" )
{
self thread gun_fired_and_ready_105mm();
earthquake (0.2, 1, level.ac130.planeModel.origin, 1000);
}
else if ( weapon == "ac130_40mm_mp" )
{
earthquake (0.1, 0.5, level.ac130.planeModel.origin, 1000);
}
if ( self getWeaponAmmoClip( weapon ) )
continue;
self thread weaponReload( weapon );
}
}
Can anyone help please, thanks