Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Have succeeded in getting a projectile to launch after ship destruction  (Read 395 times)

0 Members and 1 Guest are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5623

It remains to see if I can tie an illumination source to the ballistic projectile, for the complete effect.

But as of just now I've added a new method to be invoked when a ship is destroyed, and which launches a ballistic projectile to serve as a signal rocket.

My test effect at the moment is the same kind of fire and smoke trail as for projectiles blasted out of explosions in general. I'll make up an effect to look like a bright point of light. I can control the delay to whatever range I desire, as a random selection in seconds. For instance, I could set a random delay of between, say, 4 and 15 seconds--or whatever. I could of course add randomness to the very occurrence, where not all destroyed ships successfully fire off a flare. Ideally I'd like to reduce the chance of flare firings for smaller vessels.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5623

After assigning a sprite effect that looks like a bright light, and incorporating a lightpointactor to add ambient illumination. Some more fine tuning to do. On the left the flare is still rising, and on the right about to dip into the drink.

What would be a representative muzzle velocity, or about what height to achieve? How about color? What about the volume of smoke?

Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Frankiek

  • SAS Team
  • member
  • Offline Offline
  • Posts: 2336

I remember playing a SCW campaign for DBW 1.71-SCW where you would have green flares signaling that you could take off. The effect was quite realistic maybe something could be learned from there 
Logged

tomoose

  • Modder
  • member
  • Offline Offline
  • Posts: 1684
  • Iiiiiiiit's ME! Hurrah!!
    • 71 "Eagle" Squadron

BAT has a flare object (albeit without the smoke tail) which I used as a 'takeoff' signal for a B17 campaign I was building.  However, the flare was not a one-off in that it repeated itself every few seconds which was a bit of an immersion killer.

Your flare effect/object looks a lot more realistic IMHO even if it is for a different purpose.  Kudos.
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5623

A ship just exploded several seconds ago, and a flare has just been fired. I figure a universal 'danger' color of red might be more appropriate. The altitudes reached are 700-1000 feet (up to ~300m), with a burn time of about 15 seconds. I decreased the size of the smoke particles and reduced their live time somewhat. I'll decrease the size of the flare texture a bit.

Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5623

Here's the new method in Explosions.class, which lets loose the flare 3 to 7 seconds after ship destruction, for a burn time of 14 to 16 seconds, and accompanied by a red hued illumination that dimly lights up objects/ground/water when near enough. The firing direction is somewhat random, being centered on vertical but with departures of as much as about 30 degrees.

I was rather shocked to get it working at all, and especially after only an hour or so of bashing (I can spend a whole day on a problem and still not succeed.) Anyway, I still know barely enough to get into trouble!  ;D

Code: [Select]
    public static void Fire_Flare(Point3d point3d, int i)
{
if (Config.isUSE_RENDER())
{
final Loc loc_1 = new Loc(point3d);
final Vector3d vf = new Vector3d();
double tim = TrueRandom.nextDouble(3.0, 7.0);
new MsgAction(tim)
{
public void doAction(Object obj)
{
vf.set((double) TrueRandom.nextFloat(-0.5F, 0.5F), (double) TrueRandom.nextFloat(-0.5F, 0.5F), 1.0);
vf.normalize();
vf.scale((double) TrueRandom.nextFloat(70.0F, 80.0F));
float f_1 = TrueRandom.nextFloat(14F, 16F);
BallisticProjectile ballisticprojectile = new BallisticProjectile(loc_1.getPoint(), vf, f_1);
Eff3DActor eff3dactor = Eff3DActor.New(ballisticprojectile, null, null, 1.0F, "3DO/Effects/Tracers/Piropatron/Flare_Burn.eff", f_1);
eff3dactor.postDestroy(Time.current() + (long) f_1 * 1000L);
LightPointActor lightpointactor = new LightPointActor(new LightPointWorld(), new Point3d());
lightpointactor.light.setColor(1.0F, 0.1F, 0.0F);
lightpointactor.light.setEmit(0.5F, 100F);
eff3dactor.draw.lightMap().put("light", lightpointactor);
Eff3DActor.New(ballisticprojectile, null, null, 1.0F, "3DO/Effects/Tracers/Piropatron/Flare_Smoke.eff", f_1);
}
};
}
}
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Kopfdorfer

  • member
  • Offline Offline
  • Posts: 2120
  • Potez 63.11 France's most significant AC in 1940

Dear WXTech ,

I believe a 3-7 second delay is waaaayy too quick of a response time
to get off an emergency flare for a crew that has either been at battle stations
( otherwise occupied ) or totally taken offguard ( in which case the delay would be even longer ).
I hope someone with real experience might chime in on this , but I would think the delays might be
more of the order of  30 sec - 45 sec - 60 sec - 75 sec - 90 sec ( I used 5 examples assuming there was
a technical reason you did in our example ) .
The fellow firing it would have to 1) get to the Very Pistol , 2) make sure it is loaded , 3) get to a suitable
firing point on a fatally damaged ship and then 4) fire.
You could make an argument that my scale should stretch longer at the later end ( maybe 90 and 120
or even longer ).
I do understand it enhances the drama of the game to have the flare go off while the attacker is still in the area.

Just my 10 cents worth ( is anything still 10 cents anymore ? ).

Kopfdorfer
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5623

And one could argue that unless the ship's crew was caught completely unawares, during the attack someone might have had the presence of mind to be prepared, so as to be able to act quickly.  ;)

I can certainly expand the window of time much more, which makes good sense. I just hope no boat goes under the waves before the flare is fired.  ;D  Speaking of which... Some craft, such as the Daihatsu landing craft, are handled so as to disappear pretty much immediately upon destruction. They should have a short delay if flares are fired from them.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Kopfdorfer

  • member
  • Offline Offline
  • Posts: 2120
  • Potez 63.11 France's most significant AC in 1940

If different vessels have different response times ( which does make sense even if only due
to the distances the crew would have to cover to get to a Very Pistol and then get to a suitable place to fire it )
I can see how this would quickly multiply the complexity of the code.
I am trying to remember the number of ship classes in technics.ini ( huge , large , small , tiny , maybe ? ).
Perhaps the scale could be linked to an existent structure such as this hull size to simplify the job.


Yes I know I should shut up as I don't know jack about java or coding or whatever other evil spells you
are working with.
Your ideas just get me excited with possibilities.


Kopfdorfer


Logged

tomoose

  • Modder
  • member
  • Offline Offline
  • Posts: 1684
  • Iiiiiiiit's ME! Hurrah!!
    • 71 "Eagle" Squadron

WxTech;
perhaps this has been covered before but along the same lines, didn't bombers (e.g. B17s) fire flares over the airfield to indicate wounded aboard?  Is this something that could be done?

If it can't be coded as part of the aircraft itself perhaps simply a flare dropping from a specific height if an aircraft passes over the object?  Just tossing it out there.  ;)
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5623

For someone who's more skilled than a 'monkey see, monkey might do' Neanderthal, having a flare fire from a plane should induce no sweat. For me, consideration of the larger number of variables introduces mind stretching complexity.  ;) The confluence of altitude, nearness to home base (or any airfield, I guess), and the state of plane damage are a tougher nut to crack than this simpler ship business here.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

tomoose

  • Modder
  • member
  • Offline Offline
  • Posts: 1684
  • Iiiiiiiit's ME! Hurrah!!
    • 71 "Eagle" Squadron

WxTech;
ackd, getting way ahead of myself by asking, sorry, LOL.  I should let you finish one project before suggesting another.  :)
Logged
Pages: [1]   Go Up
 

Page created in 0.073 seconds with 26 queries.