Topic: SFC3 API function " mCreateFleet"  (Read 2423 times)

0 Members and 2 Guests are viewing this topic.

Centauri Vaughn

  • Guest
SFC3 API function " mCreateFleet"
« on: July 02, 2003, 11:12:31 pm »
Does not return correct values for the ship count.


  mCreateFleet(typeid( tSpawnShip ), 3, <- I  get 2x the amount of ships, in this case 6 ships will appear instead of 3.
          65000, kClassFrigate,kClassBattleship, 4,
         kStartPosition_M,
         kSpawnShip, 0,0,-1,-1,
        "Spawn Fleet", kDefaultShipOptions,  Race);



Has anyone else encountered this?
If so please fill me in.  
« Last Edit: December 31, 1969, 06:00:00 pm by Centauri Vaughn »

Jim

  • Guest
Re: SFC3 API function " mCreateFleet"
« Reply #1 on: July 03, 2003, 05:53:54 pm »
Yeah, it is getting called twice... just use the other functions to create your ships (i.e. create each ship separately - you have more control that way, anyhow).

Jim  

Centauri Vaughn

  • Guest
Re: SFC3 API function " mCreateFleet"
« Reply #2 on: July 03, 2003, 08:05:21 pm »
Hey Jim!

Glad to see your still around.  

The SFC2 API's  (mCreateFleet) returned a poor variant percentage  (escort ships and hardly any heavy battlecruisers) unlike the SFC3 API that returns a good mixed variant percentage but doubles it's ship count.    

Sheesh!! "mCreateFleet"  is such a double edge sword. But it still allows for less code vs "mCreateShip".
Since I have already built a random engine around mCreateFleet I am just going to deal with it for now.
However, a ShipList Library for SFC3 would be ideal..

Thanks for the confirmation.


     

The_Pelican

  • Guest
Re: SFC3 API function " mCreateFleet"
« Reply #3 on: July 04, 2003, 10:10:37 am »
I don't get this problem, and all of my scripts use CreateFleet. Because the BPV system is screwed up on SFC3 (it ignores BPV, and just uses the ship classes). If you still have a problem, use a loop, and have a int32 variable set to the number of ships you want. Then set CreateFleet to make only 1 ship.

Here is a sample of code from one of my scripts, it's the same basic design straight through my scripts.

 
attackerTeam->mCreateFleet( typeid( tShipInfo ), 1, playerBPV, kClassFrigate, kClassDestroyer, 10000, kStartPosition_H,
                                    NULL, 0, 0, -1, -1, NULL, static_cast<eShipOptions>( kDefaultShipOptions ), playerRace );