Nexus Modding > Scripting

Fleets

(1/2) > >>

Mularac:
Is there a way to know if a ship belongs to a certain fleet? The players fleet, for instance.

The Old Dragon:
Hi Mul,

Found the following in the Gospel according to St Nexus...


--- Quote --->   fleet (r) – if the ship belongs to a fleet, than it is the identifier of the fleet, otherwise 0 (on contrary to the station’s home fleet name, it is not a fleet, but I’m sure that everyone knows that already) launcher (r) – the ship that sent it out (it cannot be used by the transport!!!);
--- End quote ---

So in theory, something like...

Debug(E.ship, "belongs to ", E.ship:fleet, "fleet");

May supply the data that you want..?

Mularac:
huh... wonder how I missed that...
Though, I can't use the debug window, I'm working on the campaing environment. I'd test this further, though.

EDIT: Yeah, it works like a charm, thank you a LOT Old Dragon.
Example of usage: Lets say that the ship whose scene object is identified by the variable m.ship and that this ship belongs to the player's fleet, then this condition: m.ship:fleet = uPlayersFleet() will be true.

The_Small_Time_Modder:
Im starting to get curious in this area of the game.

I have one mission of my own where i placed the players ships litterally in a shield-like formation. I have a battleship in the center of it, a support ship behind the battleship, a cruiser to the left and right of the support ship, and NDF corvettes, frigates and destroyers in a curved V shape around the battleship and support ship.

Heres a pictograph if you guys have no clue how it looks.

B = Battleship
S = Support
D = Destroyer
F = Frigates
Cr = Cruisers
C = Corvettes

-----------------------------------------
               C       C
        F                      F
                    S
        F                      F
   Cr                           Cr
        D          B         D
           C               C
              D         D
                    C
------------------------------------------

I have them all level, and the support ship has a fortress shield.
The fleet has about 4 fighter wings, 4 gunboat wings and 6 bomber wings if i recall correctly.

 Thoughts anyone?

Mularac:
I... don't understand, thoughts about what?

Navigation

[0] Message Index

[#] Next page

Go to full version