Bridge Commander Central
BC Forums => BC Scripting => Topic started by: Kirk on May 07, 2008, 11:58:51 PM
-
Hey, I was thinking it would be nice if we pooled our knowledge of BC console codes into one easy-to-access thread. I'll start.
Exit BC (in case of BSOD)
import sys
sys.exit()
Enter "Edit" mode (useful for making POTDs)
Edit()
-
App.g_kUtopiaModule.TakeScreenshot()
Takes a screenshot of the current screen, so, because you are in the console it will take a screenshot of the console as well.
There could be more, but you will need to wait for a mod of mine, which is going slowly.
This mod will include a "dump" command meaning you can dump the entire console to a file instead of just the visible part. And an clear command for clearing the console.
-
Took these from a post MLeo made a while back to DJ Curtis.
Pause BC
App.g_kUtopiaModule.Pause(1)Un-pause BC
App.g_kUtopiaModule.Pause(0)
-
Then you would also like to know about these:
import SimpleAPI
SimpleAPI.Speed(0.5)
And
import SimpleAPI
SimpleAPI.Speed(8)
-
Isn't there one for cloaking too?
-
Well, assuming a ship has a cloak, you can do this:
For the player:
App.Game_GetCurrentPlayer().GetCloakingSubsystem().InstantCloak()
App.Game_GetCurrentPlayer().GetCloakingSubsystem().InstantDecloak()Or:
App.Game_GetCurrentPlayer().GetCloakingSubsystem().StartCloaking()
App.Game_GetCurrentPlayer().GetCloakingSubsystem().StopCloaking()
The latter is used for normal cloaking.
For any other ship:
pSet = App.Game_GetCurrentPlayer().GetContainingSet()
pShip = App.ShipClass_Cast(pSet.GetObject("Name of Ship"))
pShip.GetCloakingSubsystem()............ I think you get the drift. ;)
There are also these neat functions in App:
CloakingSubsystem_SetCloakTime
CloakingSubsystem_GetCloakTime
CloakingSubsystem_SetShieldDelay
CloakingSubsystem_GetShieldDelayBut these functions are "global", meaning, they affect all ships.
So I'm afraid no variable cloaking for different ships. :(
Yes, I've tried that.
-
You can exit a BSOD easyly by pressing Alt+F4 :?
-
Hey Kirk when you use the edit function for a potd what do you do after you've typed it into the console? Nothing really comes up. KM 1.0
-
You can exit a BSOD easyly by pressing Alt+F4 :?
Never worked for me, and it doesn't work in normal BC either.
However, it does work when the debug console pops up.
-
Hey Kirk when you use the edit function for a potd what do you do after you've typed it into the console? Nothing really comes up. KM 1.0
Keep in mine, it must be Edit()
When you enter "Edit mode" a menu, which I have had little success in using and understanding, should pop up. You can roatate the camera with your mouse and move the camera forward/backward with the up/down arrow keys as well as left/right with the corresponding arrow keys. The only down side is that there is a display in the bottom left of the screen that indicates the camera position. I'm unsure if there can be a script made that removes these numbers.
-
I think for being able to close it with alt+f4 you have to have the console logger installed & enabled. In my install it is in Autoexec.py in the scripts directory - don't know wich mod braught that with it, I assume it was KM1...