<!--quoteo(post=219810:date=Nov 1 2007, 06:01 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Nov 1 2007, 06:01 PM) [snapback]219810[/snapback]</div><div class='quotemain'><!--quotec-->Are you happy with this code as-is then? ...<!--QuoteEnd--></div><!--QuoteEEnd-->
I changed it yet again to CCC's original values except for i<2, and I now have 5 models.
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> // ccc rescue survivors
AISeaGoods.ModelsPath = "LowCharacters"; //path to the crewmodels
for (i=1; i<2; i++) //runs loop two times
{
//survivor calculation for tutorial: iSwimQuantity = rand(20) would work, but...
iSwimQuantity = MakeInt(1 + rand(sqrt(GetMaxCrewQuantity(rCharacter)))); //... this adds more survivors for bigger ships
AISeaGoods_AddGood(rCharacter, "Oil", "Lo_Man", 1000.0, iSwimQuantity); //floats a "fake" salvagegood with a sailormodel
AISeaGoods_AddGood(rCharacter, "Oil", "Lo_Ma2", 1000.0, iSwimQuantity); // Petros added 4 more swimmer models
AISeaGoods_AddGood(rCharacter, "Oil", "Lo_Ma3", 1000.0, iSwimQuantity); // Ditto
AISeaGoods_AddGood(rCharacter, "Oil", "Lo_Ma4", 1000.0, iSwimQuantity); // Ditto
AISeaGoods_AddGood(rCharacter, "Oil", "Lo_Ma5", 1000.0, iSwimQuantity); // Ditto
}
AISeaGoods.ModelsPath = "SwimGoods"; //reset path to the salvagemodels
// ccc rescue survivors end<!--c2--></div><!--ec2-->
Sinking produce between 1 and 5 swimmers, with no repeat models.
I was still getting only one or two from the Galleons (I don't use Battleships, Warships or Line Ships)
I started to play with the debris field. I made it smaller and got very few swimmers and noticed one merged in an orange crate. That gave me the idea that the Galleon may be swallowing up swimmers due to it's size and taking them down, so I widened the debris field.
Now the Galleon (only tried it once so far) has given me 4 swimmers.
The code for that is just below the swimmer model code.<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> // calculate random position
float fAng = stf(rCharacter.Ship.Ang.y);
float x = (frnd() - 0.5) * 60.0; // ccc rescue original 20.0; spreads salvage wider //build 13 changed to 50.0, //Petros Change to 60.0 to get swimmers from Galleons
float z = (frnd() - 0.5) * 100.0; // ccc rescue original 40.0 //build 13 changed to 90.0, //Petros Change to 100.0 to get swimmers from Galleons
RotateAroundY(&x, &z, cos(fAng), sin(fAng));<!--c2--></div><!--ec2-->
I changed it yet again to CCC's original values except for i<2, and I now have 5 models.
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> // ccc rescue survivors
AISeaGoods.ModelsPath = "LowCharacters"; //path to the crewmodels
for (i=1; i<2; i++) //runs loop two times
{
//survivor calculation for tutorial: iSwimQuantity = rand(20) would work, but...
iSwimQuantity = MakeInt(1 + rand(sqrt(GetMaxCrewQuantity(rCharacter)))); //... this adds more survivors for bigger ships
AISeaGoods_AddGood(rCharacter, "Oil", "Lo_Man", 1000.0, iSwimQuantity); //floats a "fake" salvagegood with a sailormodel
AISeaGoods_AddGood(rCharacter, "Oil", "Lo_Ma2", 1000.0, iSwimQuantity); // Petros added 4 more swimmer models
AISeaGoods_AddGood(rCharacter, "Oil", "Lo_Ma3", 1000.0, iSwimQuantity); // Ditto
AISeaGoods_AddGood(rCharacter, "Oil", "Lo_Ma4", 1000.0, iSwimQuantity); // Ditto
AISeaGoods_AddGood(rCharacter, "Oil", "Lo_Ma5", 1000.0, iSwimQuantity); // Ditto
}
AISeaGoods.ModelsPath = "SwimGoods"; //reset path to the salvagemodels
// ccc rescue survivors end<!--c2--></div><!--ec2-->
Sinking produce between 1 and 5 swimmers, with no repeat models.
I was still getting only one or two from the Galleons (I don't use Battleships, Warships or Line Ships)
I started to play with the debris field. I made it smaller and got very few swimmers and noticed one merged in an orange crate. That gave me the idea that the Galleon may be swallowing up swimmers due to it's size and taking them down, so I widened the debris field.
Now the Galleon (only tried it once so far) has given me 4 swimmers.
The code for that is just below the swimmer model code.<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> // calculate random position
float fAng = stf(rCharacter.Ship.Ang.y);
float x = (frnd() - 0.5) * 60.0; // ccc rescue original 20.0; spreads salvage wider //build 13 changed to 50.0, //Petros Change to 60.0 to get swimmers from Galleons
float z = (frnd() - 0.5) * 100.0; // ccc rescue original 40.0 //build 13 changed to 90.0, //Petros Change to 100.0 to get swimmers from Galleons
RotateAroundY(&x, &z, cos(fAng), sin(fAng));<!--c2--></div><!--ec2-->