Author Topic: Count number of bombs destroyed  (Read 984 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:
https://github.com/AxemP/AxemFS2Scripts/tree/master/MarkBox/data
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 »
"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

==================

"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

"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

"...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- you've probably heard me
    • 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:
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png