Page 1 of 1

Multi guns on NPC

Posted: Sun Jan 31, 2010 3:44 pm
by Killer Wolf
Is adding subents the only way of doing this?

Posted: Sun Jan 31, 2010 3:46 pm
by Commander McLane
Yes. I suppose you're talking about lasers. Each subentity may have one laser, so you have to add as much subentities as you want lasers. (And the main entity may have one as well. Actually two, one front, one aft.)

And of course, for turrets it's basically the same. Each turret its own subentity.

Posted: Sun Jan 31, 2010 4:38 pm
by Killer Wolf
cheers bud. fast reply!

Posted: Sun Jan 31, 2010 4:40 pm
by Thargoid
Sub-ent lasers and the "main" ship lasers can also have different targets, although all the sub-ent lasers (if there are multiple) will have the same target. Same applies to turrets iirc.

The Aquatics system platforms show it quite well sometimes.

Posted: Mon Feb 01, 2010 7:24 am
by Killer Wolf
hmm, didn't know that Thargoid, interesting.

anyways, i was thinking of a multi-laser design and got wondering about guns built into wings like a WWII fighter, but if i need a subent i don't think it would work in a neat fashion. the wings could be defined as subents but that might be problematic if they're destroyed. i was also wondering about defining a small subent cube or summat and burying it just under the wing. if i wanted 2 guns per wing tho it means adding 4 subents, and while that's not a massive number compared to some other OXP ships, i kinda like to keep things as compact as possible.

Posted: Mon Feb 01, 2010 9:06 am
by Zieman
@ Killer Wolf:
Make the main model so that the wings are included. Then make a wing-gun subentity and place as many of them as you want to suitable places in the wings. And if you're worried about the guns getting destroyed - just set

Code: Select all

frangible = false;
(or set max_energy & energy_recharge_rate high enough for the gun subentity) in your ship's shipdata.plist entry.

Posted: Mon Feb 01, 2010 9:59 am
by ADCK
i'm guessing you could also prpbably do it the lazy way by using subentities too small to see or models using nothing but the "hole" material if you wanted to add them to a pre-existing model...

Posted: Mon Feb 01, 2010 12:36 pm
by Disembodied
Zieman wrote:
And if you're worried about the guns getting destroyed - just set

Code: Select all

frangible = false;
(or set max_energy & energy_recharge_rate high enough for the gun subentity) in your ship's shipdata.plist entry.
Shooting the lasers off a multi-gun NPC like a Cat or an Iguana is always fun – plus it's a good leveller. If the subentities are small (like the front spikes/guns on a Wolf) it makes it more challenging, but still possible. I think it would make it a bit unfair if you didn't make them frangible – although this of course depends on what role you want for the NPC.

Posted: Mon Feb 01, 2010 6:15 pm
by Thargoid
@KW - have a look in detail at Aquatics, specifically the system platform and the Kraken. They both do something along those lines.

The sub-ent weapons are very small and not part of the main model at all. On the Kraken the carried platform's guns are actually sub-ents of the hauler herself, and there's JS code in there that if the carried platforms (also sub-ents of the hauler) are destroyed, then the relevant weapons (that irl would be on the carried platform) are also removed by the script.

Posted: Mon Feb 01, 2010 6:50 pm
by Cmdr Wyvern
Disembodied wrote:
Shooting the lasers off a multi-gun NPC like a Cat or an Iguana is always fun – plus it's a good leveller. If the subentities are small (like the front spikes/guns on a Wolf) it makes it more challenging, but still possible. I think it would make it a bit unfair if you didn't make them frangible – although this of course depends on what role you want for the NPC.
Oy, the Iguana! Of all the ships with subent weapons, the Iguana is a real pain in my tailend. It's nippy for it's size, is almost always found packing injectors, and that it's pilots tend to be a tad demented don't help.
I don't manage to kill one too often, unless the crazy bastard burns up all his fuel zipping about like a moth on a coffee overdose. I usually manage to force him to run away.

Posted: Tue Feb 02, 2010 10:10 am
by Disembodied
Cmdr Wyvern wrote:
Oy, the Iguana! Of all the ships with subent weapons, the Iguana is a real pain in my tailend. It's nippy for it's size, is almost always found packing injectors, and that it's pilots tend to be a tad demented don't help.
I don't manage to kill one too often, unless the crazy bastard burns up all his fuel zipping about like a moth on a coffee overdose. I usually manage to force him to run away.
Yup, same here ... forcing a retreat is a good result against an Iggie. If you time the rear-laser bursts right though – if you can let the little swine close in on your tail without losing most of your shield – then it's possible to flip around and finish the bugger off. Even if you manage to shoot off one of his guns (or better still, both) though they're still potentially dangerous thanks to the high levels of lunacy.

I once saw an Iguana take out a Behemoth. I think he was the last survivor of a pirate pack, but an impressive achievement nonetheless. I did spoil it a bit immediately thereafter by drilling a big hole through him, though. :twisted: