Jump to content
Sign in to follow this  
boboNuts

Boom

Recommended Posts

Well,, the shortest possible I can think of is the following:

;Snake1999 | artillery

;[centre,area,NrOfRounds,frequency] exec "*.sqs"

_centre = _this select 0

_area = _this select 1

_rounds = _this select 2

_freq = _this select 3

_bombArea = getPos _centre

_baX = _bombArea select 0

_baY = _bombArea select 1

_areaX2 = _area * 2

#Update

_rounds = _rounds - 1

Explosion = "shell125" camcreate [_baX + Random(_areaX2) - _area,_baY + Random(_areaX2) - _area, 30]

~_freq

? (_rounds > 0) : goto "Update"

exit

if you want something like atillery, mortar or similar. To Get it to work in OFP, do the following:

Go to your mission's folder, and create a new notepad document.

Paste the lines from above, and save the file as "mortar.sqs" (with quotes).

Then in OFP, place a trigger (name it "mCentre" (without quotes)), and in the onActivation field, type:

[mCentre,100,10,10] exec "mortar.sqs"

This will fire 10 rounds at the location of mCentre, with a variation up to 100m, with 10sec between each round.

(Edited by Snake1999 at 6:21 am on Dec. 31, 2001)

(Edited by Snake1999 at 6:31 am on Dec. 31, 2001)

Share this post


Link to post
Share on other sites

This is a bit more advanced than snake's 1 (no offence man).

;MP | Artilary

;["Targetmarker",Spread,Guns,Reloadtime,Ammo,Delay] exec "artilary.sqs"

_Centre = _this select 0

_area = _this select 1

_guns = _this select 2

_freq = _this select 3

_rounds = _this select 4

_delay = _this select 5

_CentrePos = GetMarkerPos _Centre

_cx = _CentrePos select 0

_cy = _CentrePos select 1

_areaX2 = _area * 2

~_delay

_ammoType = "Heat120"

#Update

? (ariStop == 1) : goto "End"

_a = _guns + 1

_a = _a - 1

#Salvo

_tempObj = _ammoType camCreate[_cx + Random(_areaX2) - _area,_cy + Random(_areaX2) - _area,50]

~0.01

~0.4

_a = _a - 1

_tempObj = objNull

? (_a > 0) : goto "Salvo"

_rounds = _rounds - _guns

~_freq - (_guns * 0.4)

? (_rounds > 0) : goto "Update"

#End

exit

To make the above work:

1: Make a Marker and name it

2: Make a trigger, set it up as desired and in the On Activation field type > ["Targetmarker",Spread,Guns,Reloadtime,Ammo,Delay] exec "artiary.sqs" <. e.g ["marker1",150,4,8,200,10] exec "Artilary.sqs".

"TargetMarker" being the name of you marker.

Spread being the MAX distance from the center of the marker.

Gun's being the total number of gun's in the battery.

Reload time explains itself.

Delay is the time it takes the shell to fly to target.

You can hear AND see the shell's falling with this 1.

ENJOY

Share this post


Link to post
Share on other sites

is your name frank??? tounge.gif

im really stupied and i have not a clue how to even have a script for a mission...

to bad you cant just use a trigger and have it so an explosion happens when it gets tripped....an idea for 1.41??

Share this post


Link to post
Share on other sites

hey thanks snake but only 1bomb gets explodes, i put the trigger for repet but still only 1, what am i doin wrong?

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">Quote: from boboNuts on 4:00 am on Jan. 1, 2002

your dont work at all MP<span id='postcolor'>

Yeah, There's been problem's with me Copying/pasting on here. You just gotta take out some extra spaces that might be there.

Make it look normal. When I pasted it on here there are extra lines between each new line (like pressing enter twice) Sombody had this problem before and the took the spaces out and it worked.

Share this post


Link to post
Share on other sites

Yes unfortunatly...

"_rounds = _this select 4

_delay = _this select 5

<<<<TAKE OUT THIS SPACE>>>>

_CentrePos = GetMarkerPos _Centre

_cx = _CentrePos select 0 "

"_ammoType = "Heat120"

<<<<TAKE OUT THIS SPACE>>>

#Update "

"#Salvo

<<<<TAKE OUT THIS SPACE>>>

_tempObj = _ammoType camCreate[_cx + Random(_areaX2) - _area,_cy + Random(_areaX2) - _area,50]

~0.01 "

"? (_a > 0) : goto "Salvo"

<<<<TAKE OUT THIS SPACE>>>>

_rounds = _rounds - _guns "

Just find the segment's I've taken from the script and remove the extra line's shown.

(Edited by MP at 5:01 am on Jan. 1, 2002)

Share this post


Link to post
Share on other sites

I can send you a sampl mission if you want.

Share this post


Link to post
Share on other sites

you mean a whole mission? cool will that have the script or will i have to use depbo to get it?

Share this post


Link to post
Share on other sites

OMG one killed me!!

thanks so much MP now i can make my cool mission w/out useing mines!

Share this post


Link to post
Share on other sites

MP at your service. :biggrin:

And I expect to see that mission when it's finished.

(Edited by MP at 5:55 am on Jan. 1, 2002)

Share this post


Link to post
Share on other sites

hey when that mission started the box that cam up and told me what to do....how u make that?

Share this post


Link to post
Share on other sites

in the activation field or init field type: hint "Whatever text here"

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×