Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Help finishing my artillery script.  (Read 1806 times)

0 Members and 1 Guest are viewing this topic.

Offline Lefty

  • Members
  • *
Help finishing my artillery script.
« on: 23 Sep 2008, 02:47:55 »
Hey all, howzit?  Okay so I created (created, copied - 'meh  :whistle:) a script to simulate artillery, following steps in the editing guide by Mu.Murray.  The good news is that I've got it working and am happy with it - for the most part.  I've got a few kinks that I need to iron out.  But first I'll put the scripts up.

Quote
Setfire.sqs:
setfire=true;
titleText ["Requesting fire-mission, over","plain down"];
~3
W1 sideChat "Affirmative. Guns ready, awaiting coordinates, over."
onMapSingleClick "ATarget setPos _pos; setfire=false";
@!setfire;
"Firepoint" setMarkerPos getPos ATarget;
onMapSingleClick "";
[] exec "artillery\single_salvo\single_salvo.sqs";
titleText ["", "plain down"];
~15
"Firepoint" setMarkerPos [0,0] ;
exit;


Quote
Single_Salvo.sqs:
titleText ["Coordinates sent, confirm, over.","plain down"];
~3
W1 sideChat "Confirmed, single-salvo, shot."
playSound "Firedirection";
~10
;+ + + Fire + + +
[W1,ATarget] exec "artillery\single_salvo\fire.sqs"
[W2,ATarget] exec "artillery\single_salvo\fire.sqs"
[W3,ATarget] exec "artillery\single_salvo\fire.sqs"
[W4,ATarget] exec "artillery\single_salvo\fire.sqs"
[W5,ATarget] exec "artillery\single_salvo\fire.sqs"
[W6,ATarget] exec "artillery\single_salvo\fire.sqs"
W1 sideChat "Rounds complete."
~5
W1 sideChat "Splash."
exit

Quote
  Fire.sqs:
_K = _this select 0;
_Z = _this select 1;
_X = getPos _Z select 0;
_Y = getPos _Z select 1;
_K doWatch [_X,_Y,5000] ;
_A =_K Ammo "M119";
~5
_K fire "M119";
@ _A > _K Ammo "M119";
~2
_N = nearestObject [_K,"HeatM119"];
_X = _X+((random 80)-40) ;
_Y = _Y+((random 80)-40) ;
_H = "HeliHEmpty" createVehicle [_X,_Y] ;
~1
_H say "Ari";
~1
_N setPos [_X,_Y,0];
"SH_125_HE" createVehicle [_X,_Y,0] ;
deleteVehicle _H;
exit


Now, for my problems.

- With single_salvo.sqs, I'm having problems with playSound Firedirection.  In-game, I get the message "Sound firedirection not found".  Referring to Mr.Murrays manual it says the sound has to be defined in the description.ext.  Couldn't figure out how to do it.

- I have several different radio commands, 'single salvo', 'two-round salvo', 'smoke' and 'illumination'.  How do I make a 'fire-for-effect' option where the guns fire until they're told to stop?  Obviously this would be two radio commands fire/stop ... again how?

- Lastly, how do I wrap all this up into a nice furry little bundle of artillery-goodness and make it accessible to to only one unit - namely a 'Forward Observer'?

If I can solve these problems, I'll be a happy camper. Any help, advice and/or suggestions will be much appreciated -  :good:

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Help finishing my artillery script.
« Reply #1 on: 24 Sep 2008, 14:57:02 »
As far as the sounds, go to the Editors Depot (ED) and check out the two sound tutorials. The old ones for OFP are still valid.
http://www.ofpec.com/ed_depot/index.php?action=list&game=OFP&type=tu&cat=cu
urp!

Offline MrMurray

  • Members
  • *
    • Mr-MurrayA‚A´s Homebase
Re: Help finishing my artillery script.
« Reply #2 on: 07 Oct 2008, 22:46:51 »
Hey!
Why you don't download it ;)

Artillerie-SP-Example 1.2 --> Download

Artillerie-MP-Example 1.0 --> Download

Other Examples: http://www.forum.german-gamers-club.de/showthread.php?t=1684


Best regards,

Mr-Murray
!!!Coming soon!!! Armed Assault Editing Guide (Deluxe-Edition)
Author of the official Armed Assault Editing Guide (German SE-Edition)
Author of the unofficial OFP Editing Guide (German SE-Edition)

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Help finishing my artillery script.
« Reply #3 on: 08 Oct 2008, 01:17:39 »
Yeah, good advice from Mr Murray there: Don't reinvent the wheel.

And if Murray's wheel ain't good enough for what you want, bug him about it ;P
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline MrMurray

  • Members
  • *
    • Mr-MurrayA‚A´s Homebase
Re: Help finishing my artillery script.
« Reply #4 on: 08 Oct 2008, 21:11:41 »
*Hehe*
I used a modified build of it in my SP-Mission Battle Of Ortego.
It has a lot of new fantastic features. Give the mission a try and see how it rocks ;)

If I would have a little more time I could release this updated build as seperate download... eeh version ;)


Best regards,

Mr-Murray
!!!Coming soon!!! Armed Assault Editing Guide (Deluxe-Edition)
Author of the official Armed Assault Editing Guide (German SE-Edition)
Author of the unofficial OFP Editing Guide (German SE-Edition)