Posted: Thu Feb 15, 2024 2:55 pm Post subject:
Re: Aircraft Repair ?
adamstrange wrote:
I have an IFV that automatically repairs units, but how do I code it to repair damaged aircraft that's at the airforce command ?
There are ways to do this, but particularly for an IFV, there is a significant drawback; you can give the IFV the AttackFriendlies attribute, plus positive damage on the Repair weapon, combined with a negative Verses on its warhead. You can then (using Ares) give the weapon the Repair cursor, so it looks the same as the original repair weapon in-game (the Repair cursor is normally invoked by a weapon having negative damage, so if you make the weapon's damage positive, you need to restore the cursor by specifically setting it to that weapon).
While this is good enough for most repair units, using it on the IFV in particular has a rather glaring drawback in that the IFV has a lot of weapon modes that you probably do not want it to hit your own units with, AttackFriendlies will cause it to do that in any weapon mode.
What you can do is to leave AttackFriendlies out, and give it "AttackCursorOnFriendlies", in which case the IFV in repair mode will no longer automatically repair your units at all, but can still, and has to be, manually ordered to repair. This way, you can send it to "attack" (i.e. repair) docked aircraft. QUICK_EDIT
maby hack an active anim to repeatedly fire a warhead that heals the aircraft over the pad area of the building _________________ visit my moddb profile for .shp downloads and stuff QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum