Jump to content
Sign in to follow this  
TemichSablin

Pointclick Artillery

Recommended Posts

Well I used some scripts for my arty.

It worked but i need some features to add.

Well all was OK but i was using Mr-Murray's arty script, but i dont need all this M119 placement and other stuff. Need only shells spawning from nowhere. So I used SARMAT's Artillery script and reworked Mr-murray's a little.

Here's my setfire.sqs

? _usesleft == mynul: goto "ARMSCRIPT" 
_enabled = _this select 0
_useshave = _this select 1
mynul = 0
mynouses = 1
? mynul == _enabled: goto "NOCANDO"
? mynouses == _usesleft: goto "OUTOFAMMO"
#SHOOT
_usesleft = _usesleft - 1
setfire=true;
titletext ["Click on the map to set TESTARTY2 fire support","plain down"];
onMapSingleClick "ATarget setPos _pos;setfire=false";
@!setfire;
"bomb" setMarkerPos getPos ATarget;
onMapSingleClick "";
[10,bomb] exec "TESTARTY2\Shoot.sqs";
titleText ["","plain down"];
~15
"bomb" setMarkerPos [0,0] ;
exit;
#NOCANDO
titletext ["Artillery is not availablie at the moment!","plain down"];
~5
titleText ["","plain down"];
exit
#OUTOFAMMO
titletext ["We are out of ammo! Can't shoot!","plain down"];
~5
titleText ["","plain down"];
exit
#ARMSCRIPT
_usesleft == _useshave
goto "SHOOT"

and here is shoot.sqs i'm experiencing problems with

_num = _this select 0 
_pos = _this select 1 
a=0 
#LOOP 
? a==_num: goto "EXT" 
_Bo1="Sh_125_HE" createVehicle [(getPos _pos select 0)+(-100+random 200), (getPos _pos select 1)+(-150+random 300), (getPos _pos select 2) + (100+random 200)]; 
~1 
_Bo1="Sh_125_HE" createVehicle [(getPos _pos select 0)+(-100+random 200), (getPos _pos select 1)+(-150+random 300), (getPos _pos select 2) + (100+random 200)]; 
~1 
_Bo1="Sh_125_HE" createVehicle [(getPos _pos select 0)+(-100+random 200), (getPos _pos select 1)+(-150+random 300), (getPos _pos select 2) + (100+random 200)]; 
~1 
_Bo1="Sh_125_HE" createVehicle [(getPos _pos select 0)+(-100+random 200), (getPos _pos select 1)+(-150+random 300), (getPos _pos select 2) + (100+random 200)]; 
~1 
_Bo1="Sh_125_HE" createVehicle [(getPos _pos select 0)+(-100+random 200), (getPos _pos select 1)+(-150+random 300), (getPos _pos select 2) + (100+random 200)]; 
~1 
_Bo1="Sh_125_HE" createVehicle [(getPos _pos select 0)+(-100+random 200), (getPos _pos select 1)+(-150+random 300), (getPos _pos select 2) + (100+random 200)]; 
~1 
_Bo1="Sh_125_HE" createVehicle [(getPos _pos select 0)+(-100+random 200), (getPos _pos select 1)+(-150+random 300), (getPos _pos select 2) + (100+random 200)]; 
~1 
_Bo1="Sh_125_HE" createVehicle [(getPos _pos select 0)+(-100+random 200), (getPos _pos select 1)+(-150+random 300), (getPos _pos select 2) + (100+random 200)]; 
~1 
_Bo1="Sh_125_HE" createVehicle [(getPos _pos select 0)+(-100+random 200), (getPos _pos select 1)+(-150+random 300), (getPos _pos select 2) + (100+random 200)]; 
~1 
_Bo1="Sh_125_HE" createVehicle [(getPos _pos select 0)+(-100+random 200), (getPos _pos select 1)+(-150+random 300), (getPos _pos select 2) + (100+random 200)]; 
~1 
a=a+1 
? a<_num: goto "LOOP" 
#EXT 
exit 

what's the problem with the script?

need only(!) shells from nowhere, dont redirect me to Mr-Murrays and Real Artillery etc.

Share this post


Link to post
Share on other sites

I'm assuming that the shells don't spawn or something?

Change _pos = _this select 1 to _pos = getmarkerpos (_this select 1) and erase the getPos commands from the createvehicle lines. You can't getpos a marker's location, you need getmarkerpos. If it still doesn't work, you might have to give a setpos command to the shells after the createvehicle command.

Edited by Celery

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×