View Full Version : Making a ship self-destruct after firing?
24th Oct 03, 12:37 PM
I know that people talked about this previously in regard to making one-use ships to be used as missiles, but at the time I don't think anyone came up with a solution.
So, the question is, is it possible to make a ship self-destruct after it fires one time? An equal solution would be to make it self-destruct after the ship's target is destroyed. Or, can you make a ship take damage at the same time that it damages the enemy?
24th Oct 03, 12:38 PM
i think once we get the mod tools, you could have it run the death animation right after its attack is done.
24th Oct 03, 1:03 PM
Okay, thanks for the reply. I guess I'll have to wait, then. :(
24th Oct 03, 1:35 PM
The other thing is to make sure it's auto-set to Passive so it will only fire at a target you specifically pick.
I could see this being a really interesting way to implement "living bomb" ships - in other words, projectiles with huge warheads that are fired directly from the MotherShip. If you don't take it out by the time it gets within a certain range of the enemy, it converts to an untargetable missile. This could wreak HAVOC with resourcing operations.
24th Oct 03, 3:46 PM
Why make a ship that is a missile? Why not make a missile that is a ship...
Heres my (untested) theory on what you could do:
If you open a .miss file, you'll find that you can change both the controller type and the build type for a missile. So, essentialy, if you change the controll type to "ship" and make it buildable and have the missile use the same .hod file as a ship does, you essentialy have a contolable, one use ship/controlable missile/raming frigate.
24th Oct 03, 7:26 PM
Retroboy: that's exactly what I had in mind. :)
thesamonthemoon: Hmm, sounds interesting. I'll test it some time soon and see what happens. However, I don't think it'll work because then you'd have to give it a weapon, otherwise it won't be able to target and therefore ram something. If you give it a weapon, then it won't attempt to ram, since it'll try to fire instead. Oh well, I'll see what happens.
24th Oct 03, 7:44 PM
Give it a .wepn file... but dont actualy use the weapon on any ships. That way it's essentialy a buildable missile. Also you could make a weapon "hit" affect. For an example of this see vgr_concusionmissilelauncher.wepn, vgr_smallmissileburst.wepn, and vgr_smallmissile.wf (weapon effects file in data/scripts/weaponfire/). That way you can make it create an explosion on impact.
I'll test this out too. I'll see if I can make a ramming frigate...
24th Oct 03, 9:26 PM
is there something in the cata beast missle that u could use in hw2 to achive the effect your looking for?
24th Oct 03, 10:50 PM
thesamoon: it doesn't work, i tried it that way... they still aren't selectable, if you get it working let us know though.. you could have it's range on the weapon set to 1 - 5 or something and have the animation set to 'death' might work.
24th Oct 03, 11:02 PM
My original attempt didn't work, but I'll keep looking into it.
25th Oct 03, 12:58 AM
Setting the weapon animation to "death" doesn't work. I tried that. It plays the animation, but the ship doesn't actually die.
25th Oct 03, 1:19 AM
what a about a short range projectile (like a few inches) that explodes in a big BOOM that would cause feedback damage to the firing ship, destroying it?
25th Oct 03, 1:50 PM
I think you should just edit the cluster torpedo and make it controllable..... then you could have it break apart into like 20 diff torpedoes.. that would be AWSOME ....
25th Oct 03, 2:04 PM
i am not sure if it can be done, but you know how someone made a probe would would reduce the health and speed of local ships? Why dont have that sort of thing on your missle, only it would be activated durring its 'attack', to reduce ONLY the missles HP to 0%, that might do what you need.
26th Oct 03, 1:06 AM
Here's anotherr thought: is there a way to give a ship a probability of self-destructing after attack?
Say you have a generic super-weapon ship. Call it the Super Ion Frigate. This ship's weapon is much more powerful than the standard ion frigate, but conversely is also much more unstable, and thus has a chance of self-destructing and damaging/destroying the frigate as a result. Is such a design possible as of yet?
26th Oct 03, 1:22 AM
If we can figure out how to get ships to self-destruct after an attack, then, yes, we can. It's as simple as having LUA run a random number through a function as a parameter. Say, on a 1 out of 10 chance, boom :)
Gentlemen, I think the answer to this question lies in finding out how to call up the scuttle script. There might be a way to call up a scuttle within the weapon file.
26th Oct 03, 4:56 AM
Does the missile need to self-destruct?
I dont know exactly what you're trying to do but assuming you want a missile that actually HITS the target, why not simply give it a weapon with a range of 1, a sphereburst with radius 20 [still small enough] and enough damage to destroy the missile in the process?
So missile X flies to target, and shoots wepn_bigboom. Bigboom is a sphereburst which not only damages the target ship, but due to friendly fire obliterates the missile.
Of course if you want the missile to fire smaller missiles or an Ion Cannon, thats something else entirely.
26th Oct 03, 11:42 PM
@IWAssassin: The problem is that a sphereburst effect doesn't damage any friendly ships. I tested this by making the radius 10000, with a damage of 100000. None of my nearby friendly ships got damaged in the least when this blast went off. So, that's a no-go.
Bakuras has the right idea, but we don't know how to do that, yet, it seems.
26th Oct 03, 11:52 PM
We can as soon as we figure out how to activate the scuttle command via LUA. I tried the ship files, but no luck. Think it might be somewhere in the scripts folder, but I haven't come up with anything after some pretty extensive searching and a lot of LUA dumping :(
27th Oct 03, 9:32 AM
Oh well. Thanks for the info, anyway. If you happen to find the solution some time in the future, please post it!
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.