Home   Help Search Login Register  

Author Topic: Artillery Barrage Script  (Read 590 times)

0 Members and 1 Guest are viewing this topic.

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Artillery Barrage Script
« on: 14 Oct 2003, 03:19:25 »
Tyger
Can anybody tell me what's wrong with this script?
I tried to execute it two ways, and both were wrong.

ArtilleryBarrage.sqs
_shell = _this select 0
_centre = _this select 1
_area  = _this select 2
_freq = _this select 3
_rounds = _this select 4

_centrePos = getMarkerPos _centre
_cx = _centrePos select 0
_cy = _centrePos selct 1

_areax2 = _area * 2

#Update
_rounds = _rounds - 1
"_shell" CamCreate [_cx + Random(_areax2) - _area,_cy  + Random(_areax2) - _area,0]
~_freq
? (_rounds > 0) : goto "Update"
exit
:help:

I tried to execute the script in two ways. The first was this: ["HEAT120",artilleryMkr,50,0.5,20] exec "ArtilleryBarrage.sqs", and the second was like this: [HEAT120,artilleryMkr,50,0.5,20] exec "ArtilleryBarrage.sqs". Do I need to set my trigger to 'Switch'? I had it activated by a radio command. So, got any ideas?!?

I would be greatful if anyone could help me solve this problem. This is my first script I have written, and my esteem goes down when someting goes wrong.
Cheers!  :cheers: Tyger
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Artillery Barrage Script
« Reply #1 on: 14 Oct 2003, 03:45:53 »
Quote
"_shell" CamCreate [_cx + Random(_areax2) - _area,_cy  + Random(_areax2) - _area,0]

should look like:

_shell CamCreate [_cx + Random(_areax2) - _area,cy + Random(_areax2) - _area,0]


and:

Quote
["HEAT120",artilleryMkr,50,0.5,20] exec "ArtilleryBarrage.sqs"

should look like:

["HEAT120","artilleryMkr",50,0.5,20] exec "ArtilleryBarrage.sqs"

:note - i haven't had a look, how you did calculate your
arty, just noticed the incorrect use of high brackets.

getmarkerpos requires the markername within ""

"_shell" would be seen by the script as hardcoded string: _shell, what doesn't make sense for the script

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:Artillery Barrage Script
« Reply #2 on: 14 Oct 2003, 18:47:20 »
Tyger
I'll try this in my script, and maybe that will work. Thanks for your help Chris Death. Hopefully my script will be salvaged after all.

Cheers! :cheers: Tyger
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:Artillery Barrage Script
« Reply #3 on: 15 Oct 2003, 18:53:12 »
Thanks for the suggestions. They did help, and now it works! ;D
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Sniper_Kyle

  • Guest
Re:Artillery Barrage Script
« Reply #4 on: 15 Oct 2003, 21:33:44 »
I have been watching Chris Death help every1 in the forums and you STILL haven't been upgraded to like at least 2 stars yet.  WTF OFPEC!  LOL JK, Dont cancel my account, PLEASE!

ChEeRs,
      Sniper_Kyle ;D

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Artillery Barrage Script
« Reply #5 on: 16 Oct 2003, 00:05:04 »
lol nobody has two stars.  ;D ;D  It's impossible to get two stars.     You can have only one, unless you're a mod on that board in which case you get five.   8)    Even if you're a mod on another board, but not the one in question, you have only one star.    But yes you're right, Chris Death does a fantastic job of helping people out.   (As do others.)     Keep up the good work Chris!  :thumbsup:
Plenty of reviewed ArmA missions for you to play