View Single Post
Old 08-07-22, 01:26 PM   #101
Mad Mardigan
Admiral
 
Mad Mardigan's Avatar
 
Join Date: Sep 2016
Location: Grand Rapids, Mi.
Posts: 2,327
Downloads: 491
Uploads: 0


wolf_howl15

Quote:
Originally Posted by kapuhy View Post
It would be even better if one could order the plane to lead the target. Now there's a TurnToFaceTargetTrajectory function but when I tried to apply it to planes game kept crashing on me.

As for land units, gap certainly can elaborate on this but from what I see, the workaround used by them was to assign ship AI commander controller to land unit, which allows it to use ship strategies (and since it cannot move, only ship strategy that's available to it is shooting at any detected target that moves into range). That works very well, only downside being that bunkers bounce up and down as if they were floating on waves.

I tried to add another .aix file with instructions for CoastalDefense AI "commander":

 
strategy CoastalDefense(CoastalDefense)
{
precond
{
Ship:IsType(LANDUNIT) and Plane:HasCannons() and Ship:CanFireCannons()
}
action
{
Ship:FireCannons();
}
}


Game accepts it (as in, does not CTD on me. When I added the file including obvious syntax errors just to see if game even "sees" the file, it CTD'd on loading the mission) but after checking with AI script debugger - land units using CastalDefense AI do not use the strategy from that file.

EDIT: it just occurred to me that unlike modified "ship" bunker from TWoS, stock land units don't have any sensors so they might not fire cannons because they cannot detect any target...
Stock, land units... like cannons or artillery pieces, may not... but... there must be some means to make the stock ones have the sense to fire at targets at sea.


Just as an example... I recall with FotRS-U or was that... TMOverhauled v2.5 BH edition, was patrolling near a small island making way for... the Sulu Sea, after passing through that narrow passage on the west side of Borneo... I believe... Got tagged by shell fire, &... I was like... 9-10 nm's away from that sucker. As I best recall the day hours, was like... just around dusk/twilight... as I recall.


Now, I know that is pertaining to SH4... & may... or may NOT be, applicable here... what with it being SH5... but, wouldn't hurt to look into & see if there aren't similarities there, that could be used... here, in SH5 land.


Hope this info.... helps... as always.









M. M.
__________________
Mad Mardigan is offline   Reply With Quote