
"G_arty.sqs"
- Kod: Zaznacz cały
;// Generic Artilly Script
;//
;// by Fishion
;//
;//
;// I made this because of the enourmous number of Artillery Scripts
;// which use Men to place bombs, Vehicles to create the illusion of
;// an explosion, or simple in a different from to shoot smoke shells
;//
;// to replace all those Artillery Simulating Scripts this should be sufficient
;// to the needs of most people (evan has sound)
;//
;// big advantage is you can actually choose the ordanace (if you wish you
;// shoot Boats or Car by the Artillery, eventhough this is simply stupid)
;//
;// (c)Aug 2001
;//
;//********************
;//**** Parameters ****
;//********************
;// Target Coordinates:
;// This should be an array containing min 2 numbers (X and Y Coord) but a normal
;// GetPos should do (no select 0 etc.)
_coords = _this select 0
;// Type of Ordanance (String Value), look at Weapons and Ammo or Objects Tree for types
_ord = _this select 1
;// Height (numeric) at which Ordanance should be Spawned (150 or so works fine)
_height = _this select 2
;// Number of volley fired by the Artillery
_VolleyNr = _this select 3
;// Number of Shots in each Volley
_ShotNr = _this select 4
;// Time between Volleys
_vTime = _this select 5
;// Time Variation between Volley (the Max deviation from _vtime)
_vTimeVar = _this select 6
;// Time Variation within each Volley
;// (Note: For Time on Target Barrages (ToT) put a 0 here)
_vTimeVol = _this select 7
;// Maximum Distance for shots off the Aimed Point
_radius = _this select 8
;//************************
;//**** Parameters END ****
;//************************
;//Put in Radiochatter here!
;//**************************
;//**** Main Arty Script ****
;//**************************
_nr = 0
#loop
?(_nr > _Volleynr):goto "ende"
_volnr = 0
;//inner loop (within volley)
#volley
;// Increment Counter
_volnr = _volnr + 1
;// create ordonance
_ord camCreate [(_coords select 0) + (random _radius) - (_radius / 2), (_coords select 1) + (random _radius) - (_radius / 2), _height]
;// wait a random time for the next Shot
;// (note _vTimeVol is the total time a Barrage needs to land, thus devided by the number
;// of shots)
;// wait and avaoid errormessage
?(_shotnr == 0):goto "avoid"
~(Random(_vTimeVol / _Shotnr))
goto "endrnd"
#avoid
~0.1
#endrnd
?(_volnr <= _Shotnr):goto "volley"
;//innerloop end
;// Increase Counter
_nr = _nr + 1
~(_vtime + (Random _vTimeVar ))
goto "loop"
#ende
;//Put in Radiochatter here!
Juz w edytorze zrob tak:
-postaw game logic np. artytarget 1 (bedzie robil za zblizona strefe ostrzalu)
- nastepnie triggerek (aktywacja w zal. od syt. east,west,radio,etc) (rozmiarek jaki potrzebujesz). type: switch, min np. 5 max15 mid10, condition - this, on activation: [getpos artytarget1 "fdf_mortar81mag",150,3,1,5,4,4,150] exec "g_arty.sqs"
Et voila.
Bum bum bum
Posluzylem sie pociskiem z fdf`a bo najwiecej w to gram, ale jak najbardziej mozna podac inna nazwe pocisku w zaleznosci od moda jaki kto gra
Tu jest objasnienie tego rzedu cyfr co podalem w przykladzie
- Kod: Zaznacz cały
;// Type of Ordanance (String Value), look at Weapons and Ammo or Objects Tree for types
_ord = _this select 1
;// Height (numeric) at which Ordanance should be Spawned (150 or so works fine)
_height = _this select 2
;// Number of volley fired by the Artillery
_VolleyNr = _this select 3
;// Number of Shots in each Volley
_ShotNr = _this select 4
;// Time between Volleys
_vTime = _this select 5
;// Time Variation between Volley (the Max deviation from _vtime)
_vTimeVar = _this select 6
;// Time Variation within each Volley
;// (Note: For Time on Target Barrages (ToT) put a 0 here)
_vTimeVol = _this select 7
;// Maximum Distance for shots off the Aimed Point
_radius = _this select 8
Skryptu nie modyfikuj jedynie co wartosci na triggerze (ile salw,jak dlugo,rozrzut,etc) We wklejeniu objasnienie kazdej wartosci