Author Topic: Global sabotage  (Read 1771 times)

0 Members and 1 Guest are viewing this topic.

Offline Speshal

  • 23
Okay here's one for you lot, I've got a mission where there's a large convoy with a few friendly fighter wings.  I've created a sort of EMP bomb that when gets destroyed will disable every ship in the mission.  To do this I've coded a sabotage weapons and engines sexp for when the bomb detonates.  Trouble is I've now got to do this for every ship in the mission which will take too long.

Is there anyway I can do this without making an event for every ship?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Using FS2_Open this is a lot easier

when-argument
-every-of
-List of ships
-true                 <-----------------------Replace with your event trigger SEXPs
-set-subsystem-strength
--<argument>
--Weapons
--0
-set-subsystem-strength
--<argument>
--Engines
--0


You may have to do a bit of cutting and pasting to get it to accept those subsystems once you change the ship name to <argument> but it will work in game for any ship which has a subsystem called engines. You may also need to have a seperate event/events for ships with subsystems called engine 1 etc.

Either way this is still easier than doing it manually for every ship most likely. At the very least you can handle all the fighters with one event.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Turey

  • Installer dude
  • 211
  • The diminutive form of Turambar.
    • FreeSpace Open Installer Homepage
Also, you can open a .fs2 in notepad and mass copy events, but that's a bit harder.
Creator of the FreeSpace Open Installer.
"Calm. The ****. Down." -Taristin
why would an SCP error be considered as news? :wtf: *smacks Cobra*It's a feature.

  

Offline Speshal

  • 23
Using FS2_Open this is a lot easier

when-argument
-every-of
-List of ships
-true                 <-----------------------Replace with your event trigger SEXPs
-set-subsystem-strength
--<argument>
--Weapons
--0
-set-subsystem-strength
--<argument>
--Engines
--0


You may have to do a bit of cutting and pasting to get it to accept those subsystems once you change the ship name to <argument> but it will work in game for any ship which has a subsystem called engines. You may also need to have a seperate event/events for ships with subsystems called engine 1 etc.

Either way this is still easier than doing it manually for every ship most likely. At the very least you can handle all the fighters with one event.

Excellent job that did it!  You're the man :)