BCU main page Bridge Commander Universe
...welcome to the new world.
 
 FAQFAQ  RanksRanks  RulesRules   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups  Staff SiteStaff Site    RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Join Fleet Command

 
Post new topic   Reply to topic    Bridge Commander Universe Forum Index -> BC Scripting
View previous topic :: View next topic  
Author Message

Nexxus21

Ensign
Ensign




Joined: 02 Mar 2005
Posts: 128
Location: Planet:Earth Vectors: 29-20-22.0000N / 098-28-27.000W
Offline

 

 



Reply with quote

Post Posted: 01-23-2007 05:53 PM Post subject: Join Fleet Command

Whatever happened to... Or was I dreaming....
I could have sworn there was a join fleet command where you could request friendly vessels to join up with you. Anyone know what I'm talking about or where I can find it. Smile


_________________

To Boldly Go!

Back to top
View user's profile Send private message Send e-mail

cakuzma

Ensign
Ensign


Age: 26
Zodiac: Sagittarius
Joined: 06 Mar 2002
Posts: 162

Offline

 

 



Reply with quote

Post Posted: 08-19-2007 02:10 AM Post subject:

I dont know if this is what you were looking for
make a new py file in YourDrive:\Program Files\Activision\Bridge Commander\scripts\Custom\QBautostart\ dir and put this in it

Code:
MODINFO = { "Author": "\"????"????",
            "Download": "",
            "Version": "0.1",
            "License": "GPL",
            "Description": "This script allows you to Make your Friend Part of ur Fleet "
            }

# ==============================

# Imports
import App
import MissionLib
import Bridge.BridgeUtils
import Lib.Ambiguity
import QuickBattle.QuickBattle
import Custom.QuickBattleGame.QuickBattle

# Vars for the Button
pBridge = App.g_kSetManager.GetSet('bridge')
BridgeType = App.BridgeSet_Cast(pBridge).GetConfig()
g_pKiska = App.CharacterClass_GetObject(pBridge, 'Helm')
pKiskaMenu = Bridge.BridgeUtils.GetBridgeMenu('Helm')
FFADD = App.Mission_GetNextEventType()
pDatabase = App.g_kLocalizationManager.Load("data/TGL/AddFleet.tgl")
ET_NOTIFY = None

def init():
        global pButton
   event = Lib.Ambiguity.getEvent(FFADD)
   g_pKiska.AddPythonFuncHandlerForInstance(event, __name__ + ".Ffadd")
   pButton = QuickBattle.QuickBattle.CreateBridgeMenuButton(App.TGString("Add To Fleet"), event, 0, g_pKiska)
   pKiskaMenu.PrependChild(pButton)


def Ffadd(pObject, pEvent):
   global g_pKiska, pKiskaMenu
   # get the player
   pGame = App.Game_GetCurrentGame()
   pEpisode = pGame.GetCurrentEpisode()
   pMission = pEpisode.GetCurrentMission()
   pFriendlies = pMission.GetFriendlyGroup()
   pEnemies = pMission.GetEnemyGroup()
   pPlayer = MissionLib.GetPlayer()
   pTarget = pPlayer.GetTarget()
   pTargetattr = App.ShipClass_Cast(pTarget)

   # Test if our Target is Friendly
   if (pEnemies.IsNameInGroup(pTarget.GetName())):
      print("Target is not friendly")
      return

   if (pFriendlies.IsNameInGroup(pTarget.GetName())):
      print("Target is friendly so Add to fleet")
      MissionLib.AddCommandableShip(pTarget.GetName())
#      DebugPrint("Setup Fleet Command Attack Target handler")
      pCommandFleetMenu = MissionLib.GetCharacterSubmenu("Helm", "Hail")
      if pCommandFleetMenu:
         pCommandFleetMenu.AddPythonFuncHandlerForInstance(Bridge.HelmMenuHandlers.ET_FLEET_COMMAND_ATTACK_TARGET, __name__ + ".FleetCommandAttackTarget")
#      else:
#         DebugPrint(__name__ + " error: Unable to get Command Fleet menu.")

        # tell call
        pSequence = App.TGSequence_Create()
   pAction = App.CharacterAction_Create(g_pKiska, App.CharacterAction.AT_SAY_LINE, "Joined", None, 15, pDatabase)
        pSequence.AppendAction(pAction)
        pSequence.Play()


I dont remember if I Made this or Downloaded it but here you go


_________________
Cakuzma = USS Destroyer

Back to top
View user's profile Send private message Send e-mail

UPD Equinox

TERTIARY ADJUNCT Y-8
TERTIARY ADJUNCT Y-8


Age: 20
Zodiac: Capricorn
Joined: 23 May 2005
Posts: 1418
Location: Somewhere you dont want to be...
Offline

 

 



Reply with quote

Post Posted: 08-21-2007 11:05 AM Post subject:

What is that ship in the screen shots?


_________________
I am commander Jaktel Doft Richards, I am second in command to the general and our ship is the UPD Equinox.



Back to top
View user's profile Send private message

cakuzma

Ensign
Ensign


Age: 26
Zodiac: Sagittarius
Joined: 06 Mar 2002
Posts: 162

Offline

 

 



Reply with quote

Post Posted: 08-21-2007 07:31 PM Post subject:

UPD Equinox wrote:
What is that ship in the screen shots?


The One that I'm targeting is the stock Galaxy
The one that I'm Flying is the victory class


_________________
Cakuzma = USS Destroyer

Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic

All times are GMT

Page 1 of 1
   Bridge Commander Universe Forum Index -> BC Scripting
 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group
Bridge Commander Universe is a Nightsoft company. All rights reserved.