OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Resources Beta Testing & Submission => Topic started by: johnnyboy on 31 Mar 2007, 09:23:26

Title: Oil Pump Destroy script (ACCEPTED)
Post by: johnnyboy on 31 Mar 2007, 09:23:26
This script simulates destruction of an oil pump. The pump explodes, sinks, leans over, and burns.  Includes creaking/falling metal sound fx when oil pump sinks.

Edit:  New version uploaded on August 27, 2008

Changes:
=======
1. Upped volume of wrenching sound via tweaking sound entry in Description.EXT
2. Added line of code to exit replace object script if object not local to client (per Mandoble's suggestion).

Hopefully the scripts are now multi-player friendly, but I have no way of verifying that myself.

Title: Re: Oil Pump Destroy script
Post by: johnnyboy on 08 Jul 2007, 03:49:17
This script was broken by Arma patch 1.08.

It is now fixed, and working again.  And also no longer requires Addons.
Title: Re: Oil Pump Destroy script
Post by: sharkattack on 23 Jul 2007, 20:33:42
will  check  this  out  mate ...  :)
Title: Re: Oil Pump Destroy script
Post by: LeeHunt on 15 Aug 2007, 15:51:58
this is great Johnnyboy, thanks for figuring out how to do it without an addon as well.   :good: i'm gonna use this in the sequel to Punishment Battalion! 
Title: Re: Oil Pump Destroy script
Post by: johnnyboy on 15 Aug 2007, 15:58:11
Glad you like it Lee, and I look forward to seeing it in action in your new mission.

One small change I've thought about is too make the metal wrenching sound louder, which you could do yourself in the description file I think.
Title: Re: Oil Pump Destroy script
Post by: LeeHunt on 23 Aug 2007, 22:03:46
yeh i agree, after testing the script under "combat conditions" the wrenching metal sound could be louder. I might use goldwave to jack up the volume (the description.ext boost never seems to be enough on my PC at least).  I might wait a while to make the sequel though, with ArmA 2 coming out i want to be sure Bohemia keeps patching ArmA 1 etc.  I hope they don't leapfrog ahead constantly to the point where i dont want to invest the time in learning each game's editing etc.  >:(
Title: Re: Oil Pump Destroy script
Post by: Mandoble on 24 Aug 2007, 00:28:13
A side note about MP compatibility. If you put replace_object.sqs in the init field of any object, this will be executed in every client and the server. So you will try to delete the same object as many times as machines connected which might not be harmfull, but you are creating as many new objects as machines connected too. I understand that you want to delete the original object only once and to create a replacement object only once too, so you may add:
Code: [Select]
? !local _obj_to_replace:exit
just before
Code: [Select]
call compile format ["%1 = ""%2"" createvehicle [0,0,0]", _obj_name, _obj_to_create];
Title: Re: Oil Pump Destroy script
Post by: johnnyboy on 24 Aug 2007, 19:44:41
@Lee:  I have some Arma time this weekend, so I will make the wrenching sound louder.

@Mandoble:  Thanks for the multi-player tip.  I'm still weak in MP considerations.

I will make these changes and re-upload over the weekend.

Edit:  New version uploaded on August 27, 2008

Changes:
=======
1. Upped volume of wrenching sound via tweaking sound entry in Description.EXT
2. Added line of code to exit replace object script if object not local to client (per Mandoble's suggestion).

Hopefully the scripts are now multi-player friendly, but I have no way of verifying that myself.
Title: Re: Oil Pump Destroy script (ACEPTED)
Post by: Mandoble on 01 Sep 2007, 14:40:32
The script has been accepted and included into the ED Depot ArmA scripts section.
Title: Re: Oil Pump Destroy script (ACCEPTED)
Post by: johnnyboy on 01 Sep 2007, 17:21:26
Thanks for your time and help Mandoble.  :good: