View Single Post
Old 08-09-22, 06:52 AM   #111
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by kapuhy View Post
Exclamation mark? Yes, that's exactly what it does.
Ops, sorry, exclamation mark is what I meant

Quote:
Originally Posted by kapuhy View Post
Jeff's wrote above that Strafe action might not work well without these conditions. I don't see difference in behaviour but added them just in case. As for Plane:HasBombs() and Plane:CanFireBombs(), they are already preconditions to this strategy's parent strategy.
Well, in common language, 'strafing' is done by attack aircraft when they shoot their cannons while flying low in the sky toward their target. This strategy doesn't encompass the usage of bombs, but apparently this is not the case in SH5. The only shortcoming I see in keeping those preconditions is that, if an aircraft has finished its bullets, it won't attack even though it still has plenty of bombs. Stock aircraft have a nearly endless bullet storage, but we might face a similar problem if we give them a more realistic ammo outfit.
All in all, I think that using Plane:HasBombs() and Plane:CanFireBombs() OR Plane:HasCannons() and Plane:CanFireCannons() as precondition of the parent strategy, might be preferable

Quote:
Originally Posted by kapuhy View Post
In this case they apply to the plane.

In SH5, command syntax is:

UnitType:Command(parameters) where unit type might be Plane, Sub or Ship (edit: and, possibly, CostalDefense - it's not used by any scripts but has its own AI commander so... possibly). Now, commands only work with certain types so if you try to write Plane:SetThrottleRatio, game will CTD or ignore command. But if you put Ship:SetThrottleRatio in a strategy used by the plane, game will happily accept it and apply to the plane. I don't know why it works like this, but it does. It was similar with submarine deck guns, which started working after putting "Ship" type condition in their script.
Maybe devs wanted to implement different throttle commands for different unit types, but at the end they only implemented one for all of them.

Quote:
Originally Posted by kapuhy View Post
EDIT: by the way,I attach the airplane script as it is now if you or someone else would like to take a look.
I will
__________________
_____________________
|May the Force be with you!|
...\/

Last edited by gap; 08-09-22 at 07:06 AM.
gap is offline   Reply With Quote