OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Tyger 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
-
"_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:
["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
-
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
-
Thanks for the suggestions. They did help, and now it works! ;D
-
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
-
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: