Posted: Fri May 17, 2019 12:20 am Post subject:
scripting aircraft
this is kind of a dumb question, but how does one get aircraft to follow a working script, for example: attack the enemy, land, reload and wait a while, and attack again ? i cant get them to land on their pads or cooperate, and it has be baffled to the point where i have to ask for a script. QUICK_EDIT
Scripts for aircraft attack etc. are the same like for units. With the engine limitation of cloned task forces and reload logic, you can only maximize on what the engine provides. Use same task forces in different teams with preferably Max=1 and different AITriggers so that those task forces that are free/have finished their scripts can be recruited and reused. Can also explore the options of single use aircrafts like infinite ammo and no dock etc.. QUICK_EDIT
the setup i had was 2 taskforces of 3 orcas, one is supposed to stay on a guard mission at the base, the other which is a higher priority
recruiting team is supposed to periodically attack. built by AI triggers on the (house owns) the right amount of air pads condition.
the problem im currently having is once they leave the airpad to attack an enemy which comes near, the dont land on it again, and sit
at whatever location doing nothing good. i also cant get them to properly execute attacks and im baffled.
i have no clue how to get them to do what they are supposed to via script. QUICK_EDIT
the scripts are:
guard area 450, jump to line 1 'pool'
guard area 450, attack 5(vehicles), jump to line 1 'attack'
admittedly, i have to clue whatsoever on how to make aircraft function. even if i could just get them to land on their pads again it would be tremendous.
EDIT: TI's [TDORCA] entry is as follows, if its even relevant
In YR you don't scrip the land or reloading aspect (though aircraft are unable to land on the ground there). Have it attack a vehicle or whatever, repeat until success (which is action 49,0 IIRC) then itll do it until it runs out of ammo, where itll then go back to reload automatically and have considered its mission successful so the team will dissolve.
Its probably a good idea to look at the vanilla scripts for it though. QUICK_EDIT
With one defense and one attack team there will be confusion on which team is being created. With factory cloning in TS helipads, there will be surplus task forces created with attack team itself. So, there is no need for the defense team. The cloned task forces will be available for further recruitment.
Having 3 aircrafts also lead to one getting the opportunity to reload and the remaining ones will be on land. Having lesser aircrafts per task force will give more opportunity for reload.
For the defense script, you don't need to make guard for limited time and then use line jump. Just use new mission 11,5 or 11,10 (RA2 11,11), that will make those guard indefinitely. By default units are in guard mode, if they are not in any team.
For attack script, you don't need guard for limited time and jump line, just give 0,5 (attack vehicles). Because of the engine limitation with reload logic, it is better to create new team/AITrigger to recruit the available aircrafts which can be then sent for attack.
There is no repeat in 49,0 script action, it just sets a flag to success if executed. The Attack TargetType (0,n) script actions are self repetitive in nature, subject to availability of target, ammo etc.. QUICK_EDIT
In YR you don't scrip the land or reloading aspect (though aircraft are unable to land on the ground there).
Same here, aircraft will abort any attack mission when they run out of ammo and return to a helipad, unless scripted to move to a waypoint after the attack. For some reason when I try to make an aircraft to fly to a waypoint and delete itself after an attack, it tends to get stuck hovering over and trying to land on the waypoint indefinitely.
E1 Elite wrote:
Having lesser aircrafts per task force will give more opportunity for reload.
^This. When not recruiting from preplaced units, it's recommended to have 1 aircraft per taskforce due to the way the AI will clone the units when multiple helipads are present. I would use a higher Max value on the team so that there will be multiple instances of the team, hence multiple aircraft attacking. _________________
wow. the landing on pads after attack and guard actions being simple and automatic was NOT something i anticipated. that said, i have the aircraft working now in teams of 1.
the multipad aircraft production bug, aircraft-landing-off-pad bug, and heavy restrictions on team production and scripts make it abundantly clear to me why RA2 went with the simpler and
more restricted aircraft logics. however, orca bombers with very high guard range and aircraft with 1 ammo immediately come to mind.
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