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 

Starbase decaying orbit

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

N1GH7H4WK

Ensign
Ensign


Age: 22
Zodiac: Virgo
Joined: 27 Feb 2006
Posts: 159
Location: On the bridge, Number One. Where else?
Offline

 

 



Reply with quote

Post Posted: 06-26-2006 01:58 PM Post subject: Starbase decaying orbit

I was just dreaming awake.
If we can force a ship to move from one point to another (starbases and drydocks), can we force a starbase to lose it's orbit and fall to a planet?
I think it's already done in the vesuvi6 facility, but not sure.
Would be a great CRASH in BC. (crash with the planet, and crash of the graphic engine. Smile )

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

N1GH7H4WK

Ensign
Ensign


Age: 22
Zodiac: Virgo
Joined: 27 Feb 2006
Posts: 159
Location: On the bridge, Number One. Where else?
Offline

 

 



Reply with quote

Post Posted: 06-26-2006 02:43 PM Post subject:

I found it!!:
Code:
def AsteroidHitStation():
   # Get the set and the station object
   pSet      = App.g_kSetManager.GetSet("Vesuvi6")
   pStation   = App.ShipClass_GetObject(pSet, "Facility")
   if (pStation == None):
      return
      
   # If we're playing with the hard difficulty setting, have the
   # station fall a little faster.
   eDifficulty = App.Game_GetDifficulty()
   if (eDifficulty == App.Game.HARD):
      fSpeed = 1.7
   else:
      fSpeed = 1
      
   # Send the station toward the Planet Location placement
   pPlacement = App.PlacementObject_GetObject(pSet, "Planet Location")
   vVelocity = pPlacement.GetWorldLocation()
   vVelocity.Subtract(pStation.GetWorldLocation())
   vVelocity.Unitize()
   vVelocity.Scale(fSpeed)
   pStation.SetVelocity(vVelocity)

   # Do the sequence that will let the player know to tractor
   # the station
   StationHitSequence()

now, I have to debug and assemble it as a mod

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

MLeo

Fleet Admiral
Fleet Admiral


Age: 22
Zodiac: Aquarius
Joined: 26 Nov 2002
Posts: 11439
Location: Netherlands
Offline

 

 



Reply with quote

Post Posted: 06-26-2006 02:51 PM Post subject:

Make sure you set the "stationary" flag of the "ship properties" to 0 with SetStationary otherwise it wouldn't budge for a bit in memory.Wink


_________________

How to beat the Black Screen Of Death and Script problems Also handles Console/Screen/Error report/dump.
BC Technical FAQ [Last updated 26/12/2005]
"Trust me, I'm a con artist" - Moist von Lipwig, "Going Postal, Discworld"

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

N1GH7H4WK

Ensign
Ensign


Age: 22
Zodiac: Virgo
Joined: 27 Feb 2006
Posts: 159
Location: On the bridge, Number One. Where else?
Offline

 

 



Reply with quote

Post Posted: 06-26-2006 04:03 PM Post subject:

yes, i know.
but, isn't that property loaded directly from the hardpoint? I saw it in MPE.
Or do you mean toggling it just to play the falling sequence?
I'm still trying the App.ShipClass_Cast to get if the target is a station. Then I think I'll have to use an ET_ event, right?

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

Wowbagger

Lieutenant JG
Lieutenant JG


Age: 20
Zodiac: Taurus
Joined: 03 Apr 2005
Posts: 270
Location: Minne-soh-tah
Offline

 

 



Reply with quote

Post Posted: 06-26-2006 04:15 PM Post subject:

It is a hardpoint property. I don't remember whether it can be changed in-game. I do remember that space facilities, for some reason unknown to me, aren't stationary, so you can move them. I used to just load them into the game about 20 km away from a planet, then fire few salvos of torpedoes to get them moving at 200 kph. Boom.

And it didn't even crash my system, unlike when I used The Button of Last Resort to ram those bloody torpedo turrets.


_________________

Back to top
View user's profile Send private message

MLeo

Fleet Admiral
Fleet Admiral


Age: 22
Zodiac: Aquarius
Joined: 26 Nov 2002
Posts: 11439
Location: Netherlands
Offline

 

 



Reply with quote

Post Posted: 06-26-2006 05:43 PM Post subject:

It can be changed ingame.


_________________

How to beat the Black Screen Of Death and Script problems Also handles Console/Screen/Error report/dump.
BC Technical FAQ [Last updated 26/12/2005]
"Trust me, I'm a con artist" - Moist von Lipwig, "Going Postal, Discworld"

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

N1GH7H4WK

Ensign
Ensign


Age: 22
Zodiac: Virgo
Joined: 27 Feb 2006
Posts: 159
Location: On the bridge, Number One. Where else?
Offline

 

 



Reply with quote

Post Posted: 06-26-2006 05:48 PM Post subject:

Yes, but don't forget that I'm who is trying to make it, so consider the graphic crash...

however, is my theoric script right MLeo? using ShipClass_Cast and ET_OBJECT_EXPLODING to handle the event?

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

MLeo

Fleet Admiral
Fleet Admiral


Age: 22
Zodiac: Aquarius
Joined: 26 Nov 2002
Posts: 11439
Location: Netherlands
Offline

 

 



Reply with quote

Post Posted: 06-26-2006 05:50 PM Post subject:

N1GH7H4WK wrote:
Yes, but don't forget that I'm who is trying to make it, so consider the graphic crash...
BTW, "stationary" means "no engines", not "freezed". You can move a small station with a torpedo charge or with the tractor beam. In fact, that's the last resource you have if an asteroid hits Vesuvi6's facility

In BC scripting it means: "Position frozen no matter what".

I shouldn't be to worried about a crash I think. NanoFX, that's what I'm worried about.


_________________

How to beat the Black Screen Of Death and Script problems Also handles Console/Screen/Error report/dump.
BC Technical FAQ [Last updated 26/12/2005]
"Trust me, I'm a con artist" - Moist von Lipwig, "Going Postal, Discworld"

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

Wowbagger

Lieutenant JG
Lieutenant JG


Age: 20
Zodiac: Taurus
Joined: 03 Apr 2005
Posts: 270
Location: Minne-soh-tah
Offline

 

 



Reply with quote

Post Posted: 06-27-2006 11:01 PM Post subject:

The game crashed about 30% of the time on my craptop. It crashes on about 5% of ship destructions overall, though. It's not a very good PC. I would definitely be worried about NanoFX, but the only way to find out is to try it.


_________________

Back to top
View user's profile Send private message
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.