![](https://forums.bohemia.net/uploads/set_resources_8/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
![](https://secure.gravatar.com/avatar/d05d1a96ffbc72250b56d53af8226572?d=https://forums.bohemia.net/uploads/set_resources_8/84c1e40ea0e759e3f1505eb1788ddf3c_default_photo.png)
Recoilless
-
Content Count
14 -
Joined
-
Last visited
-
Medals
Posts posted by Recoilless
-
-
I'm trying to make a singleplayer mission into a multiplayer mission. However, I'm having some locality issues. How can I make a script execute only on the server?
-
Won't that just spawn a new civilian in the east group.
Edit: I want them to appear as civies first.
-
Is there a way to make civilians become hostile and attack the players if they approach?
-
via Save Export to MP
-
I'm having trouble exporting one of my missions to a multi-player format. It seems that whenever I export all of my scripts disappear. What do I need to do to get my scripts to go along with the mission?
-
Does any one know the correct syntax so that instead of writing the triggers name I can just do "this". From what i understand this returns a boolean in a trigger.
-
Can any one help me? I'm trying to get the battery to sleep a "random" amount of time(really radius/10 or /100). I have this but I cant figure out why it doesn't work.
; **************************************************************** ; Script file for Armed Assault ; Updated for Arma 2 Zu-23 by Recoilless ; Created by: SUPR3ME KILL3R ; Thanks to Arma Edit ; **************************************************************** _K = _this select 0 _Target = _this select 1 _radius = _this select 2 _altitude = _this select 3 sleep ;(_radius/10); #Flakloop _a= getpos _Target select 0 _b= getpos _Target select 1 _c= getpos _Target select 2 _gap=random _radius _direction=random 360 _x = _a +((cos _direction)*_gap) _y = _b +((sin _direction)*_gap) _z = _c + _altitude - _radius + random (_radius*2) _gap2=random _radius _direction2=random 360 _xx = _a +((cos _direction2)*_gap2) _yy = _b +((sin _direction2)*_gap2) _zz =_c + _altitude - _radius + random (_radius*2) _gap3=random _radius _direction3=random 360 _xxx = _a +((cos _direction3)*_gap3) _yyy = _b +((sin _direction3)*_gap3) _zzz = _c + _altitude - _radius + random (_radius*2) _gap4=random _radius _direction4=random 360 _xxxx = _a +((cos _direction4)*_gap4) _yyyy = _b +((sin _direction4)*_gap4) _zzzz = _c + _altitude - _radius + random (_radius*2) _K disableAI "Target" _K disableAI "AutoTarget" _K doWatch [_x,_y,_z] ~0.5 _K setVehicleAmmo 1 _K fire "2A14" _K doWatch [_xx,_yy,_zz] ~0.5 _K fire "2A14" _K doWatch [_xxx,_yyy,_zzz] ~0.5 _K fire "2A14" _K doWatch [_xxxx,_yyyy,_zzzz] ~2 goto "Flakloop" exit
Also if any one knows how to make them fire for a sustained time that would be great.
---------- Post added at 08:41 PM ---------- Previous post was at 08:40 PM ----------
Thanks!It shoots for me, but not up in the air.
The friendly units around my AA are not safe :eek:
What values are you calling for the script? I had the same prob, but your probably not aiming high enough.
-
I took a look at it and it seems as if it would give a good effect but it doesn't want to fire.I can see it turning about targeting but there is no shooting, do I need any modules to get it to work?
I had to change it a bit to get it to work. The script tries to fire a gun. You need to change it so that it fires the appropriate gun.
; **************************************************************** ; Script file for Armed Assault ; Updated for Arma 2 Zu-23 by Recoilless ; Created by: SUPR3ME KILL3R ; Thanks to Arma Edit ; **************************************************************** _K = _this select 0 _Target = _this select 1 _radius = _this select 2 _altitude = _this select 3 #Flakloop _a= getpos _Target select 0 _b= getpos _Target select 1 _c= getpos _Target select 2 _gap=random _radius _direction=random 360 _x = _a +((cos _direction)*_gap) _y = _b +((sin _direction)*_gap) _z = _c + _altitude - _radius + random (_radius*2) _gap2=random _radius _direction2=random 360 _xx = _a +((cos _direction2)*_gap2) _yy = _b +((sin _direction2)*_gap2) _zz =_c + _altitude - _radius + random (_radius*2) _gap3=random _radius _direction3=random 360 _xxx = _a +((cos _direction3)*_gap3) _yyy = _b +((sin _direction3)*_gap3) _zzz = _c + _altitude - _radius + random (_radius*2) _gap4=random _radius _direction4=random 360 _xxxx = _a +((cos _direction4)*_gap4) _yyyy = _b +((sin _direction4)*_gap4) _zzzz = _c + _altitude - _radius + random (_radius*2) _K disableAI "Target" _K disableAI "AutoTarget" _K doWatch [_x,_y,_z] ~0.5 _K setVehicleAmmo 1 _K fire "2A14" _K doWatch [_xx,_yy,_zz] ~0.5 _K fire "2A14" _K doWatch [_xxx,_yyy,_zzz] ~0.5 _K fire "2A14" _K doWatch [_xxxx,_yyyy,_zzzz] ~2 goto "Flakloop" exit
This version should work for any zu-23
-
Naming variables x, xx, xxx, xxxx, and y,yy etc. is a great way to end up with a completely fucked program.
Never the less it works like a charm. Thank you this script is great.
-
Ok bare with me here :DThis is supremekillers flak script I used in ARMA and with some tweaking should work in A2
; **************************************************************** ; Script file for Armed Assault ; Created by: SUPR3ME KILL3R ; Thanks to Arma Edit ; **************************************************************** _K = _this select 0 _Target = _this select 1 _radius = _this select 2 _altitude = _this select 3 #Flakloop _a= getpos _Target select 0 _b= getpos _Target select 1 _c= getpos _Target select 2 _gap=random _radius _direction=random 360 _x = _a +((cos _direction)*_gap) _y = _b +((sin _direction)*_gap) _z = _c + _altitude - _radius + random (_radius*2) _gap2=random _radius _direction2=random 360 _xx = _a +((cos _direction2)*_gap2) _yy = _b +((sin _direction2)*_gap2) _zz =_c + _altitude - _radius + random (_radius*2) _gap3=random _radius _direction3=random 360 _xxx = _a +((cos _direction3)*_gap3) _yyy = _b +((sin _direction3)*_gap3) _zzz = _c + _altitude - _radius + random (_radius*2) _gap4=random _radius _direction4=random 360 _xxxx = _a +((cos _direction4)*_gap4) _yyyy = _b +((sin _direction4)*_gap4) _zzzz = _c + _altitude - _radius + random (_radius*2) _K disableAI "Target" _K disableAI "AutoTarget" _K doWatch [_x,_y,_z] ~0.5 _K setVehicleAmmo 1 _K fire "azp85" _K doWatch [_xx,_yy,_zz] ~0.5 _K fire "azp85" _K doWatch [_xxx,_yyy,_zzz] ~0.5 _K fire "azp85" _K doWatch [_xxxx,_yyyy,_zzzz] ~2 goto "Flakloop" exit
it worked very well and gave a great effect as the round went up.
all credits to supreme killer as this is his script :)
INSTALLATION:
Simply put the demo mission in your Missions folder (my documents/arma/missions) and load it.
To use the script in another mission, just copy the "flak.sqs" to the same folder of that mission.
USAGE:
This script is my first, so its going to need some fine tuning to work for different units in different situations.
It is however, simple to use. First, place the unit you want to act as a flak battery, and name it (aagun1 for example).
Then, place an object (trigger is best because you can visually change its size to see the radius they will fire within, and no other AI units will target it) and name it also. Trigger1 for example.
Now by trigger, script, or any other event, you can execute the script like this:
[aagun1, trigger1, 250, 1000] exec "flak.sqs"
250 is the radius the gun will fire randomly inside, in this case 250 meters.
1000 is the Altitude the weapon will fire at, 1000 meters in this case.
Place the trigger in the direction you want the gun to fire, so say, place it 250 meters away with 100 meter radius set in the "exec" line. The gun will fire at the trigger, 100 meters around it, in X,y, and Z directions. Placing the trigger directly on top of the AA gun with a radius of say, 300 meters, will make the gun fire in all directions, at angles within the 300 meter radius.
Once you do it a few times, you can copy/paste and create flak batteries very quickly, in a few minutes at the most.
Christ whomever programmed this needs a baseball bat to the head for naming their variables
-
Okay I got part of it. I was selecting the vehicle name not the weapon name:icon_redface:
I now have:
AA1 doWatch [11,11,10000]; AA1 selectWeapon "2A14"; sleep 3; AA1 AA1 fire "2A14";
But i cant figure out why sleep isn't interrupting the script. The gun rotates and fires at the same time
-
I'm trying to make a guerrilla in a ZU-23 fire into the sky when a trigger is activated.
So far I have.
AA1 doWatch [11,11,10000]; AA1 selectWeapon "ZU23_Gue"; AA1 fire "ZU23_Gue";
Where AA1 is the name of the guerrilla in the gun.
The doWatch command works and he looks at the position given but I cant get him to fire.
A little help would be appreciated.
~Thanks
-
I have set up some artillery by copy and pasting the stuff from the example mission on the biki, but it can only be used once. Does any one know how I can get multiple artillery strikes of a type so; for example I could have one HE strike and two WP strikes?
Locality issues in multiplayer
in ARMA 2 & OA : MISSIONS - Editing & Scripting
Posted
I tried this but to no avail, perhaps its something wrong with the scripting itself, and yes I know the names make no sense; it's altered copypasta.