Hi all,
Man I haven't played this game since OFP and I'm trying to 'convert' some snippets I used to use..
This is a random explosion generator or 'arty script I guess' there are 2 issues with it:
I get an error message that arty1 doesn't exist. (Description.ext pasted as well below)
None of the arty sounds play. Basically I want it to play one of those 4 sounds randomly before every explosion.. (atmosphere)
None of the explosions appear.
Below you will find description.ext + script.. I read up somewhere to use create vehicle instead, so instead of camcreate you'll see that. Also, I've put brackets instead of accolades since I had a feeling it might be trying to read a double array but no cigar..
NOTE: Although this is meant as an arty barrage, I like to use it to create atmosphere but adding to the spread and having the odd random explosion pop off near you, injure you or kill you even.
DIR STRUCTURE
~~~~~~~~~~
C:\Users\Pr0ph3t\Documents\ArmA 2\missions\fate01.Chernarus
-sounds
-music
SCRIPT
~~~~
; _____________________________________________________
;|##########Artillery Script By Steve Molloy:##########|
;--------------------------------------------------------------------------------------
;Due To:
;Mark Palmer's Explosion Script (markpalmer@hotmail.com)
;which was based on script created by David Berka (David.Berka@nmi.at)
;##########################################
;this is the type of shell - LaserGuidedBomb is the most powerful and also creates a visible shell so I'd
stick with it..
;you could experiment with "hellfire" "shell73" and "TOW" to get the result you want
_AmmoType = "Bo_GBU12_LGB"
_unit = _this select 0
;spread is the spread of the x axis and spread2 is for the y axis - use these to make a rectangle impact area
eg. bombing bases to hell
_spread = 140
_spread2 = 180
;this is gettin the position of the unit you put in the exec line
_Explosion = GetPos _unit
;the number of shells
_Shells = 999
;the delay between each shell being droped anything above 5 seems a little to long to me but experimenting is
the key :-D
_delay = 4
;##### there's no need for you to do anything below here #####
_counter=0
~5
#beg
~_delay
sndrnd = random 11
IF (sndrnd >= 1 AND sndrnd <= 4 ) THEN playSound "arty1"
IF (sndrnd >= 5 AND sndrnd <= 8 ) THEN playSound "arty2"
IF (sndrnd >= 9 AND sndrnd <= 10 ) THEN playSound "arty3"
IF sndrnd == 11 THEN playSound "arty4"
_cx = _Explosion select 0
_cy = _Explosion select 1
_cz = _Explosion select 2
_cx = _cx + random _spread
_cy = _cy + random _spread2
;this bit lifts the bomb to a high altitude so you can see it falling
_cz = _cz + 300
_tempObj = _AmmoType createvehicle [_cx, _cy, _cz]
~0.01
_tempObj = objNull
_counter = _counter + 1
?(_counter == _Shells):exit
goto "beg"
=-=-=-=--=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
DESCRIPTION.EXT
~~~~~~~~~~~
// This is to turn the debriefing off
debriefing = 0
class CfgMusic
{
tracks[]={molo};
class molo
{
name = "molo";
sound[] = {\music\molo.ogg, db+0, 1.0};
};
};
class CfgSFX
{
sounds[] = {arty1,arty2,arty3,arty4};
class arty1
{
name = "arty1";
sound[] = {\sounds\arty1.ogg, db+30, 1.0};
};
class arty2
{
name = "arty2";
sound[] = {\sounds\arty2.ogg, db+30, 1.0};
};
class arty3
{
name = "arty3";
sound[] = {\sounds\arty3.ogg, db+30, 1.0};
};
class arty4
{
name = "arty4";
sound[] = {\sounds\arty4.ogg, db+30, 1.0};
};
};