Bridge Commander Central

BC Forums => BC Scripting => Topic started by: vonfrank on October 01, 2009, 05:44:35 PM

Title: Phased Torpedo problem
Post by: vonfrank on October 01, 2009, 05:44:35 PM
I have encountered a problem with phased torpedoes.

I understand how phased torpedoes work (a new projectile is created after the shield is impacted so that it will impact the hull too), but on some small ships the duplicate torpedo travels right through the ship after hitting the shields and therefore making the "Phased" aspect useless.

I think whats happening is that the torpedo is taking too long to be created so that by the time it is made and BC registers the first impact, the torpedo is through the hull of the ship.

So i guess what im asking for is if there is a way to speed up the ammout of time it takes for the duplicate torepdo to be created and impact the hull.
Title: Re: Phased Torpedo problem
Post by: KrrKs on October 02, 2009, 11:07:12 AM
Maybe you could trak the new Torpedo and set the "GetMaxAngularAccel" to some rediculus (sp?) high level, so it still hits.
On a sidenode.: Projectiles with 0 Damage (maybe also ones with 0 DamageRadius) always travel through their Targets.
From what i remember the Phased Torps use some additional function to set the Damage of the new torp, maybe that returns zero. On the other hand that would affect all ships, not just small ones. Hmm
Title: Re: Phased Torpedo problem
Post by: ACES_HIGH on October 02, 2009, 01:21:15 PM
are you sure they're passing through it, and not just missing :P
Title: Re: Phased Torpedo problem
Post by: teleguy on October 02, 2009, 02:33:50 PM
are you sure they're passing through it, and not just missing :P
No, they are going straight through. Sometimes they impact on the inside of the opposite shield arc. This even happens with giant Borg ships or starbases.
Title: Re: Phased Torpedo problem
Post by: vonfrank on October 02, 2009, 03:50:57 PM
well for me on large objects like a Fed Outpost or a Scimitar the shileds are a large distance away from the hull so the torpedo has a chance to hit both.

but on smaller or even mid sized ships the duplicate passes right through the target's hull

but if i wanted to change the angular velocity or speed of the duplicate torepdo but not the parent, how could i do that?
Title: Re: Phased Torpedo problem
Post by: KrrKs on October 02, 2009, 05:12:07 PM
I think (not sure though) ObjectCreated - handlers also fire when a Torpedo is created. If that is the case you would only have to check if the new Torpedo is the wanted one (EG, if you make a position check and the Position is inside the targetRadius * X , so inside the shieldbubble)
But maybe there is an easier way to do that.
Title: Re: Phased Torpedo problem
Post by: MLeo on October 04, 2009, 05:02:52 PM
If it's my PhasedTorpedoes script (the one in FoundationTechnologies), then there shouldn't really be any lag.
What it does is get triggered by the torpedo hit event, calculate the new position (a small amount along the impact vector) and a new torpedo, exactly the same as the one that impacted, is created.

The only reason I can think of this happening is that either the ship is small, or it is moving fast.
In this case, it is probably the last reason that is causing problems here.

Changing the "duplicate" is as easy as changing the torpedo that you are firing (or another script that is firing a child torpedo).
Title: Re: Phased Torpedo problem
Post by: vonfrank on October 14, 2009, 08:24:07 PM
well i dont think is because the ship is too small because even on a Galaxy class the torepdo sometimes just passes through the ship after impacting the shields. and its probably not the speed of the target either because it happens on ships that are stationary as well