Page 1 of 1

kamikazi aircraft?

Posted: 21 Sep 2016, 06:04
by bobthedinosaur
Its been awhile.... I've been tinkering with some stuff but its all based on some old version of the game, like years ago old.

Has any one for any game/ mod made a working kamikazi aircraft with lua magic or new engine crap? I remember there was a cruise missile that was an actual aircraft and that seemed to work fine, but I think it remote controlled the entire unit via lua move ctrl and made it difficult to exist as a command able aircraft that later gets a kamikazi attack command.

Re: kamikazi aircraft?

Posted: 21 Sep 2016, 06:09
by Forboding Angel
set aircraft to kamikaze, set kamikaze distance greater than weapon range, profit?

Re: kamikazi aircraft?

Posted: 21 Sep 2016, 20:30
by FLOZi
bobthedinosaur wrote:I remember there was a cruise missile that was an actual aircraft and that seemed to work fine, but I think it remote controlled the entire unit via lua move ctrl and made it difficult to exist as a command able aircraft that later gets a kamikazi attack command.
This is the german V1 in S44.

Re: kamikazi aircraft?

Posted: 22 Sep 2016, 15:54
by Google_Frog
This sounds quite doable without resorting to moveCtrl. Cruise altitude is controllable via lua if you want your aircraft to suddenly dive into their target. Fighter aircraft naturally dive at their target.

Re: kamikazi aircraft?

Posted: 22 Sep 2016, 21:40
by Forboding Angel
Yeah, that's what I was getting at... Put 2 weapons on it, one of them being one that is invisible and doesn't do anything, with a range slightly less than kamikaze range and boom, you have your kamikaze airplane that dives at ground targets.

Evo bombers used to use fighters so that dive bombing was a thing

Re: kamikazi aircraft?

Posted: 26 Sep 2016, 00:37
by bobthedinosaur
Forboding Angel wrote:Yeah, that's what I was getting at... Put 2 weapons on it, one of them being one that is invisible and doesn't do anything, with a range slightly less than kamikaze range and boom, you have your kamikaze airplane that dives at ground targets.
what if the aircraft already has other weapons (like air to ground rockets or cannons) and the kamikaze dive was a specialized attack?

I guess i could 0 the range for all the weapons when engaged and also drop the altitude?

------------------------
on a similar note really, but not pertaining to the aircraft behavior, could I make a dynamic kamikaze damage so that the unit that is sacrificing itself does damage proportional to its health? ie a low hp kamikaze is not as effective as a full hp one?

Re: kamikazi aircraft?

Posted: 26 Sep 2016, 10:04
by Silentwings
Probably the best solution is to catch in lua when the aircraft has an attack target for its kamikaze weapon and only then invoke MoveCtrl etc. Dynamically changing cruise altitude could work, but it whether it reacts quickly enough or will need a second pass depends on the situation and the aircrafts movement stats.

More comical solution would be to have the aircraft fire a huge MissileLauncher projectile at the target and then self destruct itself mid-flight with smoke and fireball.
could I make a dynamic kamikaze damage so that the unit that is sacrificing itself does damage proportional to its health?
Yep, Spring.GetUnitHealth, gadget:UnitPreDamaged