Okay, so Atarlost left the Foomerians with some OnDestroy code that summons a Huntress when ships are destroyed based on some probabilities. His code looks like this:
Code: Select all
<Events>
<OnDestroy>
(FooShipDestroyed 3)
</OnDestroy>
</Events>
Now I want to borrow a bit of code from the Sung dragon slaver which deletes any qainlong archcannons and replaces them with a damaged version, only I just want it to delete any weapons in the foomerian ship wreckage with the "ionpulsecannon" tag. So I borrowed the chunk from the dragon slaver and attempted to do this:
Code: Select all
<Events>
<OnDestroy>
(FooShipDestroyed 3)
(block Nil
; remove any ion pulse cannons from the wreck.
(enum (objGetItems aWreckObj "w +ionpulsecannon;") theItem
(objRemoveItem aWreckObj theItem)
)
</OnDestroy>
</Events>
Except, it doesn't work. And I understand so little about how Transcendence's scripting works that I don't have a clue why.
BTW, does anyone know of a way to make it so the Huntress ship (which is currently my avatar) create a lovely big explosion when one of the rear drive armor segments is depleted?