View Single Post
Old 03-30-10, 01:51 AM   #40
Arclight
Navy Seal
 
Join Date: Jun 2008
Location: Land of windmills, tulips, wooden shoes and cheese. Lots of cheese.
Posts: 8,467
Downloads: 53
Uploads: 10
Default

Sorry, can't do that. Will just cause players to tag each ship with a few shells so they come to a stop and then leisurely start torpedoing an entire stopped convoy.

Using "SetWeaponFactor" breaks the AI btw, don't think it's implemented yet.

Also, I think setting throttleRatio lowers the max permanently; ie ships that have throttleratio set to 0 can't move after that anymore. Better to use "SetThrottle" if they need to get underway again. (unconfirmed, testing for that now)

How about I just release my tweaks for surrendering? Unarmed (or weapons disabled due to damage), single merchant will surrender if you approach him on the surface, coming to a full stop. About the best I can do without breaking the game, or rather, avoid people abusing it (you know how it goes).


For example:
Code:
 
  Ship:IsType( MERCHANT ) == true and
  Ship:IsDocked() == false and
  Ship:ContactDetected() == true and
  Ship:GetDamage() < 0.85 and
  Ship:CanFireCannons() == false and    #won't surrender if armed
  Ship:GetShipCountInGroup( MERCHANT ) < 2 and #won't surrender if in group
  Ship:GetContactDepth() > -10 and    #only surrender to surface contacts
  Ship:GetContactDepth() < 5 and
  Ship:GetContactRelDist() < 500     #enemy must demonstrate hostile intent (close distance)
 }
 action
 {
  # -- surrender actions -- #
  #Ship:WaitAction( 10 + EXIT_TIME );
 
  ## set ship efficiency  
  #Ship:SetSensorFactor( SENSOR_LOOKOUT  , 0 );
  #Ship:SetSensorFactor( SENSOR_HYDROPHONE , 0 );
  #Ship:SetSensorFactor( SENSOR_RADAR   , 0 );
  #Ship:SetSensorFactor( SENSOR_SONAR   , 0 );
  Ship:SetThrottleRatio(0);
__________________

Contritium praecedit superbia.
Arclight is offline   Reply With Quote