Author Topic: Count number of bombs destroyed  (Read 609 times)

0 Members and 1 Guest are viewing this topic.

Offline wistler

  • 28
Count number of bombs destroyed
Hi all, is there a way of counting the number of bombs (or type of bomb) that have been destroyed in a mission?
The bombs are created using the create-weapon event (1 event per bomb) and no other bombs are used anywhere else in the mission.


Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: Count number of bombs destroyed
Two ways, I can think of right away:

a) you can count up the weapons fired by checking ammo-count of the secondary banks of bombers. Which then can add to a variable, to which you can also add with the event that does the weapon-create. This as downside as it would not work for turrets unless you table in an ammo count for each turret.
Problem is then to confirm the destruction of a bomb before impact ... which can be managed with armor values and precise damage values.

b) Axem's Markbox-script has a handy collection of lua-sexp for the exact purpose:
with it you can count up the ammount of a specific secondary weapon fired in a mission (lua-mark-weapon & lua-count-weapon), and also run a distance check of a specific weapon type (lua-get-weapon-distance) to check for impacts.

b) is much simpler and probably exactly what you want.
« Last Edit: August 26, 2020, 07:17:14 am by 0rph3u5 »
"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland


"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

"...because they are not Dragons."


Offline wistler

  • 28
Re: Count number of bombs destroyed
Great I'll have a look at both options, much appreciated 0rph3u5


Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker
    • My old squad sub-domain
Re: Count number of bombs destroyed
Bomb destroyed count?
My mind went to how we/tolwyn and I did the skipper missiles in WCS (OG years before saga).   What we did was make a dedicated new ship class and give it the kamikaze flag with attack orders.  Easily countable in any number of ways.

But if Axem has a script, more power to ya  ;) :yes: