Ambrosia Garden Archive
    • Many explosions pr missile, or missiles pr launcher.


      Is this possible in the engine.

      Will it be possible to let a missile have many explosions, which are then chosen at "random" , or have a luncher launch different missiles.

      The reason I am asking, is that I want to do an explosion where pieces fly to a side, or around a little.
      Such an explosion will be kind of lame if it is the same all the time.

      Alternating between 3 different explosions would be perfect.

      I do not see a way yet, but maybe one of those more into weapon and outfit creation can help me.

    • I'm not sure how to have random explosions, but look in the Nova Hacks sticky for a way to have a single launcher fire different ammo types. You may also find a way to use this for the random explosions, by having it fire different missiles that look alike but they have different explosions.

    • If your 'missiles' only go in a straight line then one way to make them appear different is to have different images in different frames of the one sprite.

    • @guy, on Jun 2 2007, 12:11 AM, said in Many explosions pr missile, or missiles pr launcher.:

      If your 'missiles' only go in a straight line then one way to make them appear different is to have different images in different frames of the one sprite.

      He didn't want to make the missiles look different, but the explosions. And there making a different image for each angle would obviously not be possible, as you'd need all the frames do make the explosion actually move (and thus, explode).

      One way to solve the problem would be to make several hidden outfits (and, of couse, give them to the player when he acquires the weapon, and remove them when he discards it) which fire mutually exclusive and each can only have one shot per launcher on screen at any one time. This should (theoretically, i didn't try this, i just made it up in the greatness of my mind :rolleyes: ) force the weapons to fire alternatively. You'd have to fine-tune the on-screen time of the missile, the reload time of each launcher and the number of hidden weapons so that each one of them could fire, and not, for instance, only the first and the second.

      Edit: Just stating the obvious: Of course each of these hidden weapons would have exactly the same properties as the others and differ only in the explosion sprite.

      This post has been edited by bmac : 03 June 2007 - 10:49 AM

    • @bmac, on Jun 3 2007, 03:48 PM, said in Many explosions pr missile, or missiles pr launcher.:

      He didn't want to make the missiles look different, but the explosions. And there making a different image for each angle would obviously not be possible, as you'd need all the frames do make the explosion actually move (and thus, explode).

      One way to solve the problem would be to make several hidden outfits (and, of couse, give them to the player when he acquires the weapon, and remove them when he discards it) which fire mutually exclusive and each can only have one shot per launcher on screen at any one time. This should (theoretically, i didn't try this, i just made it up in the greatness of my mind :rolleyes: ) force the weapons to fire alternatively. You'd have to fine-tune the on-screen time of the missile, the reload time of each launcher and the number of hidden weapons so that each one of them could fire, and not, for instance, only the first and the second.

      Edit: Just stating the obvious: Of course each of these hidden weapons would have exactly the same properties as the others and differ only in the explosion sprite.

      Nice idea, but I think this arangement will break your reload time.
      Reload times are not tracked across different weapons even if they are basicaly the same. So you'll be able to fire all the launchers instantly, before hitting the reload time (and shot on screen limit) of the first launcher.

      What about starting a self-destructing dude mission when you buy a launcher? When the dude dies, you have OnShipDone swap out the launcher for a different one, then start another self-destructing dude that swaps it again, etc.

      You could have three launchers, and three dudes. So every couple seconds a new launcher swaps for three total different explosions.
      Note, that every time the launcher swaps, you will effectively reset the reload time.

      Make the other launchers unavailable, (so they are invisible unless you have one) when you sell one of the launchers, it aborts the dude missions.

    • @bmac, on Jun 4 2007, 03:48 AM, said in Many explosions pr missile, or missiles pr launcher.:

      He didn't want to make the missiles look different, but the explosions. And there making a different image for each angle would obviously not be possible, as you'd need all the frames do make the explosion actually move (and thus, explode).

      Yeah I know, but I thought perhaps it might of some use anyway 😉
      Your idea sounds interesting but of course it would only work for primary weapons which I somehow doubt is what he wants.

    • @desprez, on Jun 3 2007, 10:30 PM, said in Many explosions pr missile, or missiles pr launcher.:

      Nice idea, but I think this arangement will break your reload time.
      Reload times are not tracked across different weapons even if they are basicaly the same. So you'll be able to fire all the launchers instantly, before hitting the reload time (and shot on screen limit) of the first launcher.

      What about starting a self-destructing dude mission when you buy a launcher? When the dude dies, you have OnShipDone swap out the launcher for a different one, then start another self-destructing dude that swaps it again, etc.

      You could have three launchers, and three dudes. So every couple seconds a new launcher swaps for three total different explosions.
      Note, that every time the launcher swaps, you will effectively reset the reload time.

      Make the other launchers unavailable, (so they are invisible unless you have one) when you sell one of the launchers, it aborts the dude missions.

      You are right about the reload time.

      The dude mission approach would work, although, the way I get the requirement, you'd have to swap the weapon after each shot so each missile would explode differently. Probably it would even be possible to use the randomize-function, so each of the different weapons would select its successor randomly from two possible other weapons.

      I haven't been deving for some time now, but isn't there a onFire for each weapon? If so, that might be another way to do it.

    • @bmac, on Jun 4 2007, 07:25 AM, said in Many explosions pr missile, or missiles pr launcher.:

      You are right about the reload time.

      The dude mission approach would work, although, the way I get the requirement, you'd have to swap the weapon after each shot so each missile would explode differently. Probably it would even be possible to use the randomize-function, so each of the different weapons would select its successor randomly from two possible other weapons.

      I haven't been deving for some time now, but isn't there a onFire for each weapon? If so, that might be another way to do it.

      The quickest swap you can get is every second or two. Faster requires continuous date-posting, and has its own host of problems (see below)

      If you wanted to swap after every launch, again, you are breaking the normal reload time. But you could sorta bind the reload time to the swap time, if you can live with a 1 second reload (might vary from computer to computer) Just make the reload about 2 secs, and you'll get to launch only after a swap which seems to be about a second or two.

      There is no onFire function as such.

      You can simulate that function, sort of, but it requires contiunous date-posting using a self-aborting self-repeating misn. Then you use crons to detect the lack of ammo for a one-shot launcher. When it is out, then swap the launcher, and then replace the ammo. If ammo is to be limited, you'll have to track it with a placeholder item, and use that to track and decide whether to replace the fired shot or not.

      So, in otherwords, it's probably more complicated than it's worth, and the date becomes useless as a date.

      BTW, nice pun:

      Quote

      Confucius: He who play in root, eventually kill tree

    • Quote

      There is no onFire function as such.

      You can simulate that function, sort of, but it requires contiunous date-posting using a self-aborting self-repeating misn. Then you use crons to detect the lack of ammo for a one-shot launcher. When it is out, then swap the launcher, and then replace the ammo. If ammo is to be limited, you'll have to track it with a placeholder item, and use that to track and decide whether to replace the fired shot or not.

      So, in otherwords, it's probably more complicated than it's worth, and the date becomes useless as a date.

      Yes, that would probably be shooting over the top a bit. Is there no other way to have some sort of counter continuously counting upwards while the player is in flight? Then you could just swap the launcher based on the counter's value.

    • Why not use submuntions to simulate the debris? You could even, with it, give damage to other ships that get hit by the debris. Set the inaccuracy to 360 and there you go.

    • Submunition into a "spin spďn continuously" weapon with 180 inaccuracy so it'll start on a random frame. The sprite is a loop with pieces constantly flying off in various directions and disappearing into the murk. Use a normal explosion for the actual detonation.

      Eegras's idea is probably simpler though. Mine just allows the individual pieces of flotsam to be animated. In his they simply move straight out. With his, though, you can have ist so each frame is a different piece. "Flat metal" on frame one, "Nose cone" on frame two, "Toilet seat" on frame three.

      This post has been edited by Qaanol : 05 June 2007 - 01:21 PM

    • @modesty-blaise, on May 31 2007, 07:36 AM, said in Many explosions pr missile, or missiles pr launcher.:

      Will it be possible to let a missile have many explosions, which are then chosen at "random" , or have a luncher launch different missiles.

      There are all sorts of good ideas in this thread, but how would you go about making a "missile luncher" that ate missiles, rather than launching them? That would be pretty simple with a cron, I think, and perhaps more realistic. I mean, why would a luncher throw away perfectly edible missiles? 🙂

    • Mmmmm...missiles...

      Might not work or just look weird, but what about different explosions on different frames of the explosion rle?

    • @dr--trowel, on Jun 5 2007, 08:35 PM, said in Many explosions pr missile, or missiles pr launcher.:

      There are all sorts of good ideas in this thread, but how would you go about making a "missile luncher" that ate missiles, rather than launching them? That would be pretty simple with a cron, I think, and perhaps more realistic. I mean, why would a luncher throw away perfectly edible missiles? 🙂

      There I am, making a single mistake and everybody complains... I guess that's the price that comes with fame :rolleyes:

      @Josh: You mean, like a succession of explosions in a single rle, and then the missile would have to select one to show? That leads us to the question, how do you make the missile select a part of a rle, and how do you tell it at which frame to start and at which to stop?

      Unless you're suggesting that we have just unanimated pictures (one per frame) of Explosions which are selected at random from the rle. I don't think that would look very good, however.

    • @bmac, on Jun 5 2007, 09:29 AM, said in Many explosions pr missile, or missiles pr launcher.:

      Yes, that would probably be shooting over the top a bit. Is there no other way to have some sort of counter continuously counting upwards while the player is in flight? Then you could just swap the launcher based on the counter's value.

      Hmmm.... initially, I though no - but I think there migth be another resource hog way to do it.

      If date-posting is off the table, then crons are gone, and with it any way to create IF condition detection.

      Now, you could string together a bunch of missions, with the last in the chain doing the swaping and starting over again.
      But missions run at about 3 per frame like this, so for a half-second delay you'd need a chain fourty-five missions long.

      Even then, you still have the problem of how to turn off the missions when the player doesn't have the launcher. I'm not sure if you can fail a self-aborting mission, since a failed mission can still be aborted - neutralizing the fail. Even if you can, you have the problem of which mission to fail. Since Fxxx doesn't remove the mission, you will overload the max missions, trying to fail them all.

      Finaly, there is the issue that only the player's weapon will respond to launcher swapping.

      So, I have to side with Eegras, and Qaanol on this one.
      Just remember you'll need a bit of prox radius, 'cause if the missile touches a ship, it won't sub.

    • And remember prox only works from ship centre <_<

    • @dr--trowel, on Jun 5 2007, 06:35 PM, said in Many explosions pr missile, or missiles pr launcher.:

      There are all sorts of good ideas in this thread, but how would you go about making a "missile luncher" that ate missiles, rather than launching them? That would be pretty simple with a cron, I think, and perhaps more realistic. I mean, why would a luncher throw away perfectly edible missiles? 🙂

      And then every time the luncher eats a missile, it gets swapped for a more powerfull missile luncher. Or your ship gets bigger, or something.

      Now then, if your missiles are actually inertialess kamikaze fighters, you can eat the disabled ones.

      Or if the fighters are ammo for the luncher, you can pick up disabled ones and eat them, creating a missile.

      Ok, ok, back on a more serious note...
      Wouldn't that be a cool mechanic for an organic ship?... it eats over time and then "grows" by swaping your ship for a slightly bigger version. This could even happen in flight.

      Wow, and additionaly, if every ship had an invisible non-fireable launcher for every other ship, you could even "eat" disabled ships. Or maybe just the organic ones, the others would be kinda crunchy.

    • That would not simply be a ressource hog, but a whole ressource hog farm!