Home   Help Search Login Register  

Author Topic: Arty Script Alteration  (Read 653 times)

0 Members and 1 Guest are viewing this topic.

Jaenak

  • Guest
Arty Script Alteration
« on: 24 Feb 2004, 00:59:36 »
I took the artillery script from the mission "Underhill" and I like it but I'd like to know if there's anyway of having it shoot sabot shells instead of normal bombs.  Here's the script:
Quote
; Bombarding
; Run from mission:
; [who, A, B, C, "Name"] exec "Artillery.sqs"

; who - who runs the script (can be anybody)
; A - how many bombs
; B - diameter of "Area bombed"
; C - timout between two bombs
; D - name of the marker, which is in the middle of the "Area bombed"


_pos = getmarkerpos (_this select 4);
_bomb = "Bomb" createVehicle _pos;

_i = 0;
_j = _this select 1;
_k = _this select 2;
_t = _this select 3;

#LOOP

_u = random _k;
_bomb setpos [(_pos select 0) - _k/2 + random _k, (_pos select 1) - _k/2 + random _k]
_bomb setdammage 1;

~(random _t)
_bomb setdammage 0;
~(random _t)

_i = _i+1;

? prijeli : exit
? _i < _j : goto "LOOP"

deleteVehicle _bomb;
It seems to do its job but I'm confused about the sabot shell issue.  I've tried changing out bomb and _bomb with heat120 and _heat120 but it just shoots one sabot shell and no more.  Anyone have any idea's?
« Last Edit: 24 Feb 2004, 01:00:30 by Jaenak »

Offline icarus_uk

  • Members
  • *
  • LiarLiarPants Inflame True
    • [furryclan]
Re:Arty Script Alteration
« Reply #1 on: 24 Feb 2004, 01:04:28 »
Change the line;

_bomb = "Bomb" createVehicle _pos;

To read;

_bomb = "shell120" camcreate _pos

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Arty Script Alteration
« Reply #2 on: 24 Feb 2004, 01:05:32 »
You can make it fire whatever you like

_bomb = "Bomb" createVehicle _pos;


Just replace "Bomb" with what you want:  check the weapons and ammo listing in the Ed Depot - tutorials - referencese.
Plenty of reviewed ArmA missions for you to play

Jaenak

  • Guest
Re:Arty Script Alteration
« Reply #3 on: 24 Feb 2004, 03:58:57 »
Thanks, that does fix part "A" but the other problem still occurs.  The script fires one lone round somewhere within the barrage area and quits.  No barrage, just one solitary round.  :-\

sa8gecko

  • Guest
Re:Arty Script Alteration
« Reply #4 on: 24 Feb 2004, 07:29:17 »
? prijeli : exit

Perhaps the above is always true ?

Jaenak

  • Guest
Re:Arty Script Alteration
« Reply #5 on: 24 Feb 2004, 22:26:03 »
The script works now.  Sa8gecko gave me the idea to try and monkey with the coding.  The script now goes like this:
Code: [Select]
; Bombarding
; Run from mission:
; [who, A, B, C, "Name"] exec "Artillery.sqs"

; who - who runs the script (can be anybody)
; A - how many bombs
; B - diameter of "Area bombed"
; C - timout between two bombs
; D - name of the marker, which is in the middle of the "Area bombed"


_d = getmarkerpos (_this select 4);

_i = 0;
_a = _this select 1;
_b = _this select 2;
_c = _this select 3;

#LOOP

_bomb = "heat120" camcreate _d;
_e = random _b;
_bomb setpos [(_d select 0) - _b/2 + random _b, (_d select 1) - _b/2 + random _b]
_bomb setdammage 1;

~(random _c)
_bomb setdammage 0;
~(random _c)

_i = _i+1;

? _i < _a : goto "LOOP"
deleteVehicle _bomb;
exit