Jump to content

Search the Community

Showing results for tags 'Scripts'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • BOHEMIA INTERACTIVE
    • BOHEMIA INTERACTIVE - NEWS
    • BOHEMIA INTERACTIVE - JOBS
    • BOHEMIA INTERACTIVE - GENERAL
  • FEATURED GAMES
    • Arma Reforger
    • Vigor
    • DAYZ
    • ARMA 3
    • ARMA 2
    • YLANDS
  • MOBILE GAMES
    • ARMA MOBILE OPS
    • MINIDAYZ
    • ARMA TACTICS
    • ARMA 2 FIRING RANGE
  • BI MILITARY GAMES FORUMS
  • BOHEMIA INCUBATOR
    • PROJECT LUCIE
  • OTHER BOHEMIA GAMES
    • ARGO
    • TAKE ON MARS
    • TAKE ON HELICOPTERS
    • CARRIER COMMAND: GAEA MISSION
    • ARMA: ARMED ASSAULT / COMBAT OPERATIONS
    • ARMA: COLD WAR ASSAULT / OPERATION FLASHPOINT
    • IRON FRONT: LIBERATION 1944
    • BACK CATALOGUE
  • OFFTOPIC
    • OFFTOPIC
  • Die Hard OFP Lovers' Club's Topics
  • ArmA Toolmakers's Releases
  • ArmA Toolmakers's General
  • Japan in Arma's Topics
  • Arma 3 Photography Club's Discussions
  • The Order Of the Wolfs- Unit's Topics
  • 4th Infantry Brigade's Recruitment
  • 11th Marine Expeditionary Unit OFFICIAL | 11th MEU(SOC)'s 11th MEU(SOC) Recruitment Status - OPEN
  • Legion latina semper fi's New Server Legion latina next wick
  • Legion latina semper fi's https://www.facebook.com/groups/legionlatinasemperfidelis/
  • Legion latina semper fi's Server VPN LEGION LATINA SEMPER FI
  • Team Nederland's Welkom bij ons club
  • Team Nederland's Facebook
  • [H.S.O.] Hellenic Special Operations's Infos
  • BI Forum Ravage Club's Forum Topics
  • Exilemod (Unofficial)'s General Discussion
  • Exilemod (Unofficial)'s Scripts
  • Exilemod (Unofficial)'s Addons
  • Exilemod (Unofficial)'s Problems & Bugs
  • Exilemod (Unofficial)'s Exilemod Tweaks
  • Exilemod (Unofficial)'s Promotion
  • Exilemod (Unofficial)'s Maps - Mission Files
  • TKO's Weferlingen
  • TKO's Green Sea
  • TKO's Rules
  • TKO's Changelog
  • TKO's Help
  • TKO's What we Need
  • TKO's Cam Lao Nam
  • MSOF A3 Wasteland's Server Game Play Features
  • MSOF A3 Wasteland's Problems & Bugs
  • MSOF A3 Wasteland's Maps in Rotation
  • SOS GAMING's Server
  • SOS GAMING's News on Server
  • SOS GAMING's Regeln / Rules
  • SOS GAMING's Ghost-Town-Team
  • SOS GAMING's Steuerung / Keys
  • SOS GAMING's Div. Infos
  • SOS GAMING's Small Talk
  • NAMC's Topics
  • NTC's New Members
  • NTC's Enlisted Members
  • The STATE's Topics
  • CREATEANDGENERATION's Intoduction
  • CREATEANDGENERATION's HAVEN EMPIRE (NEW CREATORS COMMUNITY)
  • HavenEmpire Gaming community's HavenEmpire Gaming community
  • Polska_Rodzina's Polska_Rodzina-ARGO
  • Carrier command tips and tricks's Tips and tricks
  • Carrier command tips and tricks's Talk about carrier command
  • ItzChaos's Community's Socials
  • Photography club of Arma 3's Epic photos
  • Photography club of Arma 3's Team pics
  • Photography club of Arma 3's Vehicle pics
  • Photography club of Arma 3's Other
  • Spartan Gamers DayZ's Baneados del Servidor
  • Warriors Waging War's Vigor
  • Tales of the Republic's Republic News
  • Operazioni Arma Italia's CHI SIAMO
  • [GER] HUSKY-GAMING.CC / Roleplay at its best!'s Starte deine Reise noch heute!
  • empire brotherhood occult +2349082603448's empire money +2349082603448
  • NET88's Twitter
  • DayZ Italia's Lista Server
  • DayZ Italia's Forum Generale

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Jabber (xmpp)


Skype


Biography


Twitter


Google+


Youtube


Vimeo


Xfire


Steam url id


Raptr


MySpace


Linkedin


Tumblr


Flickr


XBOX Live


PlayStation PSN


Origin


PlayFire


SoundCloud


Pinterest


Reddit


Twitch.Tv


Ustream.Tv


Duxter


Instagram


Location


Interests


Interests


Occupation

Found 98 results

  1. Hey, guys, I have made an edited version of "Escape from Malden" and could do with a little help please as I have run into a small problem. I haven't changed much at all with the mission itself apart from changing the respawn time from 30 to 20 seconds and added RHS factions for both BLUFOR and OPFOR also by making the mission from 10 to 20 players. I also put the men who the players spawn as in groups of 3 as we are a unit and we work in groups of 5, 1 leader with 4 players. The problem is, once anyone dies it keeps stopping the mission with "mission failed" even though it's set at 50 respawns for the group! if anyone dies OR force respawns it then says mission failed, too many friendly casualties or something like that. One other thing is, this happens to the normal version of "Escape from Malden" also, but upon first respawn, someone dies straight away "force respawn" even though they just joined the game, though after getting in after that it seems fine. Another thing with the original version is that when you die you respawn as not the soldier / loadout you originally had.... Any help please? Thanks
  2. A mission where you are from a resistance group and want to take some revenge from people who invaded your country http://www.mediafire.com/file/0bcbvxz8ik4pvve/Cover+and+swimming+script.zip (Pbo and non-pbo version is inside the zip) Includes 4 scripts I made : Swimming script, AI cover script , stance checker script and META-Breaker script One of my friends tested this mission in Multiplayer and had some bugs. So I made a new version and fixed those bugs so download the link on here not on this one Good luck! Also I made another post in the multiplayer section. I really didn't know where to post and I don't know if its allowed or not (I am sorry if it isn't allowed) but I'll just do it
  3. A mission where you are from a resistance group and want to take some revenge from people who invaded your country http://www.mediafire.com/file/0bcbvxz8ik4pvve/Cover+and+swimming+script.zip (Pbo and non-pbo version is inside the zip) Includes 4 scripts I made : Swimming script, AI cover script , stance checker script and META-Breaker script One of my friends tested this mission in Multiplayer and had some bugs. So I made a new version and fixed those bugs so download the link on here not on this one Good luck!
  4. Hey all, I'm trying to create a mission where the independent faction is treated as captive until they pick up a weapon, and then treated as an enemy until they drop the weapon again. I'm pretty new to the scripting side of the mission editor entirely, but this is the basic line I'm working with (which currently makes the AI not shoot you on sight). But I'm putting the following into the player's init. if (player hasweapon null) then (player setcaptive true); That line actually works when I have the default in-editor setcaptive option off, the problems start when I try to tack anything else onto it. if (player hasweapon null) then (player setcaptive true) else (player setcaptive false); Main example: this line doesn't work, and the AI always shoots on sight, regardless of what the player spawns with. { sleep 5; while {alive player} do { if (player hasweapon null) then (player setcaptive true) else (player setcaptive false); }; }; Ideally, I'd want something like this to continuously check if the player is armed or not, but it has the same effect as the above.
  5. Hi there everyone so here is what i'm trying to create i want three Tanks to spawn with crew and then move to waypoints after a certain amount of time has elapsed. This is what i have so far.. major disclaimer here I've been experimenting with a lot of this just seeing how certain things work and trying to get the basic understanding of the language so Arma 3 coding veterans prepare the defibrillators because you might need to restart your hearts after seeing this. On a side note if anyone has any tips on learning how to code SQF, SQS etc in arma please let me know as im hungry to learn this language but can't find any good material anywhere. //if (isServer) then { _type = _this select 0; _mark = _this select 1; _time = _this select 2; _slaGrp = createGroup INDEPENDENT; //Sherman #1 _vehicleObject = createVehicle ["LIB_M4A3_75_Tubes", getMarkerPos "spawn1", [], 1, ""];_vehicleObject setDir 217.344; _S1vehicleName = "sherman1"; missionNamespace setVariable [_S1vehicleName,_vehicleObject]; publicVariable _S1vehicleName; //Sherman #1 Crew _s1Inf = "LIB_US_tank_crew" createUnit [ getMarkerPos "spawn1crew", _slaGrp]; missionNamespace setVariable _s1Inf; publicVariable _s1Inf; _s1Inf moveInDriver "sherman1"; //Sherman #2 Crew _s2Inf = "LIB_US_tank_crew" createUnit [ getMarkerPos "spawn1crew", _slaGrp]; missionNamespace setVariable [_s2Inf]; publicVariable _s2Inf; _s2Inf moveInGunner "sherman1"; //Sherman #3 Crew _s3Inf = "LIB_US_tank_crew" createUnit [ getMarkerPos "spawn1crew", _slaGrp]; missionNamespace setVariable [_s3Inf]; publicVariable _s3Inf; _s3Inf moveInCommander "sherman1"; //createVehicleCrew (sherman1 select 0); //Sherman #2 //_vehicleObject = createVehicle ["LIB_M4A3_75_Tubes", getMarkerPos "spawn2", [], 1, ""];_vehicleObject setDir 217.344; //_S2vehicleName = "sherman2"; //missionNamespace setVariable [_S2vehicleName,_vehicleObject]; //publicVariable _S2vehicleName; //createVehicleCrew (sherman2 select 0); //Sherman #3 // = createVehicle ["LIB_M4A3_75_Tubes", getMarkerPos "spawn3", [], 1, ""];_vehicleObject setDir 217.344; //_S3vehicleName = "sherman3"; //missionNamespace setVariable [_S3vehicleName,_vehicleObject]; // _S3vehicleName; //createVehicleCrew (sherman3 select 0); //};
  6. Hi, i want to edit Antistasi mission to play music in the bases. I tried it just in editor by putting trigger called "speakers" and then running this script stopmusic = 0; publicVariable "stopmusic"; music = 1; publicVariable "music"; while {music == 1} do {if (stopmusic == 1) then {music = 0;} else {switch(round(random 1))do{ case 0 : {music = 0;speakers say3D "music1";uiSleep 276;music = 1}; case 1 : {music = 0;speakers say3D "music2";uiSleep 259;music = 1}; case 2 : {music = 0;speakers say3D "music3";uiSleep 157;music = 1}; case 3 : {music = 0;speakers say3D "music4";uiSleep 147;music = 1}; case 4 : {music = 0;speakers say3D "music5";uiSleep 149;music = 1}; case 5 : {music = 0;speakers say3D "music6";uiSleep 239;music = 1}; case 6 : {music = 0;speakers say3D "music7";uiSleep 140;music = 1};}; };}; //the uiSleep is track length in seconds That works even though i haven't made use of the "stopmusic" yet. What i want is if player comes close to base (100 metres for example) random track will start playing and when it ends another random track will play, when the player leaves it will stop (i had the idea that if trigger deactivates it'll set stopmusic to 1). But the problem is that antistasi uses some kind of generation of the bases so i can't set the name of the trigger to speakers (atleast i think). My question is how can i make the script know which trigger called it? Here is createBase.sqf from Antistasi if it helps if (!isServer and hasInterface) exitWith {}; params ["_marker"]; private ["_markerPos","_size","_isFrontline","_reduced","_allVehicles","_allGroups","_allSoldiers","_patrolMarker","_currentStrength","_spawnPos","_groupType","_group","_dog","_flag","_currentCount","_patrolParams","_crate","_unit","_busy","_buildings","_building","_buildingType","_vehicle","_vehicleCount","_groupGunners","_roads","_data","_vehicleType","_spawnpool","_observer"]; _allVehicles = []; _allGroups = []; _allSoldiers = []; _markerPos = getMarkerPos (_marker); _size = [_marker] call sizeMarker; _isFrontline = [_marker] call AS_fnc_isFrontline; _reduced = [false, true] select (_marker in reducedGarrisons); _patrolMarker = [_marker] call AS_fnc_createPatrolMarker; _busy = if (dateToNumber date > server getVariable _marker) then {false} else {true}; _buildings = nearestObjects [_markerPos, listMilBld, _size*1.5]; _groupGunners = createGroup side_green; for "_i" from 0 to (count _buildings) - 1 do { _building = _buildings select _i; _buildingType = typeOf _building; call { if ((_buildingType == "Land_Cargo_HQ_V1_F") OR (_buildingType == "Land_Cargo_HQ_V2_F") OR (_buildingType == "Land_Cargo_HQ_V3_F")) exitWith { _vehicle = createVehicle [statAA, (_building buildingPos 8), [],0, "CAN_COLLIDE"]; _vehicle setPosATL [(getPos _building select 0),(getPos _building select 1),(getPosATL _vehicle select 2)]; _vehicle setDir (getDir _building); _unit = ([_markerPos, 0, infGunner, _groupGunners] call bis_fnc_spawnvehicle) select 0; _unit moveInGunner _vehicle; _allVehicles pushBack _vehicle; sleep 1; }; if ((_buildingType == "Land_Cargo_Patrol_V1_F") OR (_buildingType == "Land_Cargo_Patrol_V2_F") OR (_buildingType == "Land_Cargo_Patrol_V3_F")) exitWith { _vehicle = createVehicle [statMGtower, (_building buildingPos 1), [], 0, "CAN_COLLIDE"]; _position = [getPosATL _vehicle, 2.5, (getDir _building) - 180] call BIS_Fnc_relPos; _vehicle setPosATL _position; _vehicle setDir (getDir _building) - 180; _unit = ([_markerPos, 0, infGunner, _groupGunners] call bis_fnc_spawnvehicle) select 0; _unit moveInGunner _vehicle; _allVehicles pushBack _vehicle; sleep 1; }; if ((_buildingType == "Land_HelipadSquare_F") AND (!_isFrontline)) exitWith { _vehicle = createVehicle [selectRandom heli_unarmed, position _building, [],0, "CAN_COLLIDE"]; _vehicle setDir (getDir _building); _allVehicles pushBack _vehicle; sleep 1; }; if (_buildingType in listbld) exitWith { _vehicle = createVehicle [statMGtower, (_building buildingPos 13), [], 0, "CAN_COLLIDE"]; _unit = ([_markerPos, 0, infGunner, _groupGunners] call bis_fnc_spawnvehicle) select 0; _unit moveInGunner _vehicle; _allSoldiers = _allSoldiers + [_unit]; sleep 1; _allVehicles = _allVehicles + [_vehicle]; _vehicle = createVehicle [statMGtower, (_building buildingPos 17), [], 0, "CAN_COLLIDE"]; _unit = ([_markerPos, 0, infGunner, _groupGunners] call bis_fnc_spawnvehicle) select 0; _unit moveInGunner _vehicle; _allVehicles pushBack _vehicle; sleep 1; }; }; }; _flag = createVehicle [cFlag, _markerPos, [],0, "CAN_COLLIDE"]; _flag allowDamage false; [_flag,"take"] remoteExec ["AS_fnc_addActionMP"]; _allVehicles pushBack _flag; _crate = "I_supplyCrate_F" createVehicle _markerPos; _allVehicles pushBack _crate; _vehicleCount = 4 min (round (_size / 30)); if ( _vehicleCount > 0 ) then { _spawnPos = [_markerPos, random (_size / 2),random 360] call BIS_fnc_relPos; _currentCount = 0; while {(spawner getVariable _marker) AND (_currentCount < _vehicleCount)} do { _spawnPos = [_markerPos] call mortarPos; _vehicle = statMortar createVehicle _spawnPos; [_vehicle] execVM "scripts\UPSMON\MON_artillery_add.sqf"; _unit = ([_markerPos, 0, infGunner, _groupGunners] call bis_fnc_spawnvehicle) select 0; _unit moveInGunner _vehicle; _allVehicles pushBack _vehicle; sleep 1; _currentCount = _currentCount + 1; }; }; if ((spawner getVariable _marker) AND (_isFrontline)) then { _roads = _markerPos nearRoads _size; if (count _roads != 0) then { _data = [_markerPos, _roads, statAT] call AS_fnc_spawnBunker; _allVehicles pushBack (_data select 0); _vehicle = (_data select 1); _allVehicles pushBack _vehicle; _unit = ([_markerPos, 0, infGunner, _groupGunners] call bis_fnc_spawnvehicle) select 0; _unit moveInGunner _vehicle; }; }; _allGroups pushBack _groupGunners; if (!_busy) then { _spawnpool = vehAPC + vehPatrol + enemyMotorpool - [heli_default]; _vehicleCount = 1 max (round (_size/30)); _spawnPos = _markerPos; _currentCount = 0; while {(spawner getVariable _marker) AND (_currentCount < _vehicleCount)} do { if (diag_fps > minimoFPS) then { _vehicleType = selectRandom _spawnpool; _spawnPos = [_spawnPos findEmptyPosition [10,60,_vehicleType], [_markerPos, 10, _size/2, 10, 0, 0.3, 0] call BIS_Fnc_findSafePos] select (_size > 40); _vehicle = createVehicle [_vehicleType, _spawnPos, [], 0, "NONE"]; _vehicle setDir random 360; _allVehicles pushBack _vehicle; }; sleep 1; _currentCount = _currentCount + 1; }; }; {[_x] spawn genVEHinit} forEach _allVehicles; _currentCount = 0; while {(spawner getVariable _marker) AND (_currentCount < 4)} do { while {true} do { _spawnPos = [_markerPos, 150 + (random 350) ,random 360] call BIS_fnc_relPos; if (!surfaceIsWater _spawnPos) exitWith {}; }; _groupType = [infPatrol, side_green] call AS_fnc_pickGroup; _group = [_spawnPos, side_green, _groupType] call BIS_Fnc_spawnGroup; sleep 1; if (random 10 < 2.5) then { _dog = _group createUnit ["Fin_random_F",_spawnPos,[],0,"FORM"]; [_dog] spawn guardDog; }; [leader _group, _patrolMarker, "SAFE","SPAWNED", "NOVEH2"] execVM "scripts\UPSMON.sqf"; _allGroups pushBack _group; _currentCount = _currentCount +1; }; _groupType = [infSquad, side_green] call AS_fnc_pickGroup; _group = [_markerPos, side_green, _groupType] call BIS_Fnc_spawnGroup; if (activeAFRF) then {_group = [_group, _markerPos] call AS_fnc_expandGroup}; sleep 1; [leader _group, _marker, "SAFE", "RANDOMUP","SPAWNED", "NOVEH", "NOFOLLOW"] execVM "scripts\UPSMON.sqf"; _allGroups pushBack _group; {_x setUnitPos "MIDDLE";} forEach units _group; _currentCount = 0; if (_isFrontline) then {_vehicleCount = _vehicleCount * 2}; while {(spawner getVariable _marker) AND (_currentCount < _vehicleCount)} do { if (diag_fps > minimoFPS) then { while {true} do { _spawnPos = [_markerPos, 15 + (random _size),random 360] call BIS_fnc_relPos; if (!surfaceIsWater _spawnPos) exitWith {}; }; _groupType = [infSquad, side_green] call AS_fnc_pickGroup; _group = [_spawnPos, side_green, _groupType] call BIS_Fnc_spawnGroup; if (activeAFRF) then {_group = [_group, _markerPos] call AS_fnc_expandGroup}; sleep 1; [leader _group, _marker, "SAFE","SPAWNED", "NOVEH", "NOFOLLOW"] execVM "scripts\UPSMON.sqf"; _allGroups pushBack _group; }; sleep 1; _currentCount = _currentCount + 1; }; sleep 3; { _group = _x; if (_reduced) then {[_group] call AS_fnc_adjustGroupSize}; { if (alive _x) then { [_x] spawn genInitBASES; _allSoldiers pushBackUnique _x; }; } forEach units _group; } forEach _allGroups; [_marker, _allSoldiers] spawn AS_fnc_garrisonMonitor; _observer = objNull; if ((random 100 < (((server getVariable "prestigeNATO") + (server getVariable "prestigeCSAT"))/10)) AND (spawner getVariable _marker)) then { _spawnPos = []; _group = createGroup civilian; while {true} do { _spawnPos = [_markerPos, round (random _size), random 360] call BIS_Fnc_relPos; if !(surfaceIsWater _spawnPos) exitWith {}; }; _observer = _group createUnit [selectRandom CIV_journalists, _spawnPos, [],0, "NONE"]; [_observer] spawn CIVinit; _allGroups pushBack _group; [_observer, _marker, "SAFE", "SPAWNED","NOFOLLOW", "NOVEH2","NOSHARE","DoRelax"] execVM "scripts\UPSMON.sqf"; }; waitUntil {sleep 1; !(spawner getVariable _marker) OR (({!(vehicle _x isKindOf "Air")} count ([_size,0,_markerPos,"BLUFORSpawn"] call distanceUnits)) > 3*count (allUnits select {((side _x == side_green) OR (side _x == side_red)) AND (_x distance _markerPos <= (_size max 300)) AND !(captive _x)}))}; if ((spawner getVariable _marker) AND !(_marker in mrkFIA)) then{ [_flag] remoteExec ["mrkWIN",2]; }; waitUntil {sleep 1; !(spawner getVariable _marker)}; { if ((!alive _x) AND !(_x in destroyedBuildings)) then { destroyedBuildings = destroyedBuildings + [position _x]; publicVariableServer "destroyedBuildings"; }; } forEach _buildings; deleteMarker _patrolMarker; [_allGroups, _allSoldiers, _allVehicles] spawn AS_fnc_despawnUnits; if !(isNull _observer) then {deleteVehicle _observer};
  7. Forgive me if this is in the wrong place. I'm looking for some help on installing editor scripts for ArmA 3. I want to use one of ALIAS' scripts (in particular his snowstorm script) but I have absolutely no idea how to install or use it. I've downloaded the file, but I don't know what to unpack and to where. Could anyone help a scripting noob out?
  8. Hey there! I was wondering if there was a way to pack scripts into a mod and initialize them whenever the player beginns a mission in single or multiplayer. If tried it with this: class CfgVehicles { class Land; class Man : Land { class UserActions { class acms { displayName="acms"; position="player"; onlyforplayer=1; radius=1.0; condition="this == player"; statement="[] execVM ""ACMS\init.sqf"""; }; }; }; class All {}; class Static: All {}; class Building: Static {}; class NonStrategic: Building {}; class TargetTraining: NonStrategic {}; class TargetGrenade: TargetTraining {}; }; and also with this: class cfgvehicles { class Logic; class ACMS_Name : Logic { displayName = "ACMS"; icon = "\ca\ui\data\icon_functions_ca.paa"; picture = "\ca\ui\data\icon_functions_ca.paa"; vehicleClass = "Modules"; class Eventhandlers { init = "(_this select 0) execvm ""init.sqf"" "; }; }; }; which is a part of this forum topic: http://www.ofpec.com/forum/index.php?topic=35205.0 It would be okay if the player would have to Press a button like F7 or smth like that but not have to change anything in the mission. I don't know any other way to do this. I am new in the modding scene altough i know the basics and more of scripting. I really do hope that someone can help me with my prolem. :)
  9. SQF Classes for ArmA 3 Edited - release updated with a couple of bugfixes - if you downloaded prior to 6pm GMT on 29 October then please re-download to get the corrected files. "If . . . [the] fact [that brutes abstract not] be made the distinguishing property of that sort of animal, I fear a great many of those that pass for men must be reckoned into their number." -- George Berkeley Many times when scripting in SQF it may occur that implementing object-oriented techniques can simplify or enhance certain abstractions. The technique of using getVariable/setVariable on a unit or gamelogic to store function code or references specific to that unit's situation is a common pattern found in many missions and modules. Here, that idea is taken one step farther: instead of storing functions on game objects, we store an array of class names (representing a chain of inheritance or a mixture of interfaces). Meanwhile, a master Classes array holds a subarray for each defined class, containing a function definition for each class method. With this arrangement and just a handful of primitive functions, an unlimited variety of classes and methods can be declared on-the-fly while a mission is running. Release (.zip): https://github.com/dwringer/a3system/releases/tag/v1.0 Code: http://github.com/dwringer/a3system/tree/master/ClassDemo.Tanoa This is a selection of modules drawn from a larger repository I keep at http://www.github.com/dwringer/a3system/. There, more recent versions of these modules can often be found. I also placed other modules I created over the years, which are of variable quality and may or may not be worth a look. Class layout Lambda Macros Example overview This will demonstrate how to create abstract instances and send messages (method calls) to them. The included example is a mission with four men (crew_1..crew_4) and two vehicles (car_1, car_2). You may easily duplicate it in a different map if you don't have Tanoa available. There is a single Radio Alpha trigger, upon whose activation the following scripts are executed: CG = ["CrewUnitGroup"] call fnc_new; [CG, "assign", crew_1, "driver"] call fnc_tell; [CG, "assign", crew_2, "gunner"] call fnc_tell; [CG, "assign", crew_3, "driver"] call fnc_tell; [CG, "assign", crew_4, "gunner"] call fnc_tell; [CG, "assign", car_1, "vehicle"] call fnc_tell; [CG, "assign", car_2, "vehicle"] call fnc_tell; [CG, "board_instant"] call fnc_tell; Here, fnc_new is how we create a new instance. It accepts the class name and any init parameters appended to it (here there are none). We could also put a Game Logic in the editor instead of using fnc_new, and in its init use the following: _nil = this spawn { waitUntil {not isNil "ClassesInitialized"}; [_this, "CrewUnitGroup"] call fnc_instance; .. rest of code .. }; The method calls are actually made with fnc_tell, which takes as parameters the class instance, method name, and subsequently each method parameter. Thus, all methods to all classes are defined and called using a standardized syntax and set of functions which have been precompiled. Since fnc_instance makes an instance out of an existing object, we can also use it for creating class inheritance. Consider the following: DEFCLASS("MySubClass") ["_self"] DO { [_self, "SuperClass"] call fnc_instance; .. rest of code .. _self } ENDCLASS; Now, MySubClass inherits all the methods from SuperClass. Each game object keeps an ordered list of its class assignments, so if a method is not found on MySubClass it will be looked up on SuperClass. I have provided the macros SUPER and SUPER_ARGS in include\classes.hpp to facilitate subclassing from within classdef header files. If you want to create a subclass method that implements a superclass method under a different name, that can be done by looking up the class alist in the Classes global alist and using the function contained there as a new method. In classdef files, this has a macro called ALIAS(subclass, subclass_method, superclass, superclass_method). Another example Without further ado, the link to the repository containing the above example mission folder and all required modules is: Release (.zip): https://github.com/dwringer/a3system/releases/tag/v1.0 Code: http://github.com/dwringer/a3system/tree/master/ClassDemo.Tanoa Good luck, and if anyone creates some useful classes or a cool class tree, I'd love to hear about it. Even if this just serves as an example of what can be done to (ab)use SQF, I am satisfied. "No point in mentioning these bats, I thought. Poor bastard will see them soon enough." -- Raoul Duke Edited - release updated with a couple of bugfixes - if you downloaded prior to 6pm GMT on 29 October then please redownload to get the corrected files. There were changes made to fnc_tell and fnc_filter related to nil values being passed as parameters. Edited - added another example section
  10. jstibbsy

    [SP] Escapists Grasp

    Mission - 2 Escapists Grasp Campaign Overview Sgt. Andrew Martinez... A normal soldier, until the Stratis incident hit and most of NATO was wiped out. He along with his fellow survivors must Retreat from an overwhelming enemy, Organise a force to be reckoned with and finally Act on the advantages gained. Mission Overview Martinez has been captured by the AAF and is headed for Altis. Escape and find a way to safety. Credits Sgt. Andrew Martinez - Adrian Green SSgt. Michael Sanders - Scott Alsworth Cpt. Verga - Anne Luchtenveld Sgt. O'Cardinal - Caboose (Jake) General Help - BI Forums ArmA 3 itself - Bohemia Interactive Features Custom voice acting Cutscenes Dialog Story Scripts Links http://steamcommunity.com/sharedfiles/filedetails/?id=742160956 https://drive.google.com/open?id=0B9NbVBWWOxNDSzBtZUU5ZUtxeUE
  11. DRONGO’S TOOLKIT VOICES (DTV) Based on the Drongo's Voices module found in Drongo's Toolkit, by Drongo69 Modified and made standalone by kenoxite Standalone dynamic speech/speaking AI (DSAI) tool for mission makers. DOWNLOAD v1.0: http://www.mediafire.com/download.php?3d2hi983iapaj85 Features AI units are able to say different phrases, depending on context English, Russian and Arabic voices You can exclude entire sides, groups, classes or specific units from saying anything Units will either whisper or don’t say anything when it’s considered nighttime Units will yell and call for help when wounded Compatible with kSuppression (units yell for incoming grenades, when they’re pinned down, etc). Overrides ECP DSAI, if present Works in MP Requirements DrongosToolkitVoices.pbo (included) ECP_DSAI.pbo (found in ECP) Installation Merge the template mission into yours Copy all the files and folders from the template mission (except mission.sqm) to your mission’s directory Edit the DTV_settings.sqf file, if appropriate Notes Female civilians will yell when in danger. Otherwise they’ll be silent, as there’s no feminine voices provided in the pbos. DTV is less responsive to the environment than ECP’s DSAI, as it tracks groups at a very basic level, and lacks a built-in infoshare. On the other hand DTV is way more flexible, allowing you to specify the language spoken by each side, including arabic. Changelog v1.0 - Initial release Credits Drongo69, original DSAI scripts vektorboson (OFP script lib) General Barron (randomint.sqf) ECP, for inspiration and DSAI pbos CoC guys, for CoC NS 2 SLX, for inspiration EXTRA DTV includes a yet again modified version of DrongosToolkitVoices.pbo. This time all the arabic voices have been converted to wss format and lip versions of each one have been created. That means that now any unit speaking arabic won't use telepathy anymore to comunicate, but will move his mouth accordingly. You can download this modified version separately, through the below link. DrongosToolkitVoices.pbo (modified arabic voices): http://www.mediafire.com/download.php?l7bwm93jt9fsli2 All credits to Wolfrug and Sickboy, who created the arabic voices in the first place.
  12. I'm trying to make an intro to a mission where it shows a group in a Prowler (light strike vehicle from Apex) driving by a group and opening fire on them as the car passes. The only problem is they aren't opening fire from within the vehicle. I had to put a script in place to prevent them from leaving the vehicle at the first sign of an enemy, and now they aren't firing when i keep them in. I tried setting them to invincible,and parking them nearby, and I notice they're throwing grenades, and targeting opponents, but never firing. Should I use a script to get them to fire non-stop, or is there a way around this?
  13. I'm trying to make an intro to a mission where it shows a group in a Prowler (light strike vehicle from Apex) driving by a group and opening fire on them as the car passes. The only problem is they aren't opening fire from within the vehicle. I had to put a script in place to prevent them from leaving the vehicle at the first sign of an enemy, and now they aren't firing when i keep them in. I tried setting them to invincible,and parking them nearby, and I notice they're throwing grenades, and targeting opponents, but never firing. Should I use a script to get them to fire non-stop, or is there a way around this?
  14. ok first of im not sure if this is the correct forum to post this?....but anyway, basically, im haveing a few issues as when i have a few scripts running on my dedi server sometimes it freezes on load screen (but i can hear sounds and seem to be able to walk around), it mostly does it when i try to rejoin the server as first time it loads straight in, i can can upload my mission file here if someone would be willing to have a look, i am a bit of a newbie when it comes to scripting, but it all works fine on lan server and iv researched this like hell and anything i have tried doesnt help. ps iv been through all the trouble shooting for being stuck on load screen, its defo something to do with my scripts, im 90% sure its how im executing them, so would really need someone to take a look, sure let me know!!! :)
  15. Hello, Well, before 3Eden I was working in a long mission for a lot of time, then It came Eden update and I don't know why I saw you could backup your 2d mission. I was stupid not doing any "manual" backup... When I first load the mission in 3Eden all seemed moved from where it was, and the pilots and troopers with "movein [vehicle]" in their init are out of the vehicle, so I think it's normal and all should fix when starting the game. Well, when I preview in Eden editor I got a bunch of errors: And the game starts as no player was selected, from a very high view... and all the init are not executed, even simple scripts doesn't works. Please, help me :c
  16. Hi, on our server we are very pleased when playing at "random mission generators" Of course, first something did create these missions in editor and write script file for this. Is there a way to create something like this. -- i create unit groups and give him names like _mission1, _mission2, _mission3 -- i make the HQ at main base -- i the HQ making the computer that haves trigger to incoming players and add button "Get the mission" -- after that randomizer creates random mission at previosly defined locations _location_mission1 and generates random unit group -- add mission objective to map -- make checks for getting new mission its imposble and add item "pass mission" for script bugs i know its possible when use script file and program code. its there a way to create this with EDEN only? == 2. its there a way to append arsenal / garage to both item and how to do this in EDEN? i think - "where the player comes trigger and trying to use mousewheel - they have command arsenal / garage" and arsenal have ALL items including voices, watermarks, heads.
  17. Hello Community, I brain teasering a long time. Search the web for a solution but I don`t find something. Can someone help. Know someone to place a 3D Marker in the editor like the E3 2012 presentation from ArmA 3? Like this?
  18. Hello first off, I'm not sure if this is the correct place to post this. I was on the fence between here and "ARMA 2 & OA : ADDONS - Configs & Scripting". Im want to know more about the actuall scripts/commands than the addon itself so I think it belongs here. Edit this post as you wish. I saw someone use a debug console and I thought it was the greatest thing I have eveer seen in Arma. However now having one (This one in specific https://forums.bistudio.com/topic/72232-debug-console-for-arma-2/ ) I dont quite understand it. For example I managed to get some things working like: hint format ["Hello %1",getPos player]; cursorTarget setDamage 1 cursorTarget setDamage 0 player setPos [(getPos player select 0) +10, getPos player select 1, getPos player select 2]; but if I tried to run a script (that I know works when executed from my action menu) It did only some parts like hints, and finding my direction, but I didn't spawn anyvehicles in like it should have. Here is the line I executed in the console: _handle = execVM "flyingDestroyerT1.sqf"; This above is me not understanding how this works especially why I cannot for the life of me figure out how to spawn a vehicle from it. Next, since I I managed to get "player setPos" above to work, I wanted to try to make a command to teleport infront of myself like the one in infistar by branching off of that command since it only moves me one direction reguardless of where I faced. So I came up with this, which doesn't work: player setPos (player getPos [50,(getDir player)]); I saw in the wiki That I could use the getPos command like this: player getPos [10,45]; to get the position 45degrees and 10 feet away from me so I thought I would replace 45 with getDir since I know that worked for an output in the debug console but nothing happened once executed, I tried many forms of this with no success so I succome to the forum. Shorted down, my end questions are: -Why/how can I spawn vehicles in debug (I've seen it happen in Arma 3) -any basic info I should know about the debug console since I found little to no info/help on it. -How to get the TP infront of me command/script to work. -Why only half of my script "flyingDestroyerT1.sqf" ran when used in the console (I can include this if you wish). Thanks, this is pretty much my first post, sorry for mistakes or this being impossible to understand, I tried my best!
  19. Website: www.ForceReconAG.com **Apply Today!** Steam Group: http://steamcommunity.com/groups/ForceReconAG Contact Email: FRAGusmc@gmail.com TS: TS3.ForceReconAG.com Arma 3 server: F.R.A.G. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Force Recon Assault Group also known as F.R.A.G. is an ARMA 3 realism gaming clan that was created in the image of the United States Marine Corps back in 2013. We were one of the biggest milsim groups on Arma 3 when the game was released. F.R.A.G. has been reactivated and is currently recruiting. We have a firm ranking structure to impose authority and ensure organization within the unit. We do have active and retired military within the unit that are more than willing to help you learn the basics. We currently have around 20 people and also looking for others with out mindset. Here at F.R.A.G. we train our members to operate flawlessly in the field by hosting weekly training and dynamic operations (more info can be found on our website). F.R.A.G employs the use of tactics at all times during our gameplay to control the field and outcome. We use our custom mod pack to enable the full immersion of being a United States Marine and the situations that follow that title. Force Recon Assault Group has its strict side but if you are strong enough to endure, you will have the best experience Arma has to offer. There are no other units like F.R.A.G., join today and earn your place in Arma history.. Oorah!!
  20. CivPopulate A script package that populates areas dynamically with civilians and adds traffic to the roads. * FOR OFP/CWA * Current version: 1.4.1 DOWNLOAD: http://www.mediafire.com/download/6o5w3m4t4y4b0ap/civPopulate_v141.zip CONTENTS: Template Demo mission in Nogova Demo mission in Nogova to test CoC UA. Debug mode on. FEATURES: Populate your towns with as many civilians as you want in as many towns as you want Civilians wander the streets or idle lazily inside or near buildings. You can populate your towns with civilians from different addons to increase the diversity of the population Population changes depending on if it's day or night Just one simple, light script is used to manage an unlimited amount of walker civilians Add any pack of civilians by adding templates *New* Civilian traffic You can now also designate camping areas Populate towns with specific types of civilians Add and remove designated towns and camps on the fly You can pause, resume, reset or completely stop civPopulate You can now really set an unlimited amount of towns and camps (previously there was a limit of 63) USE: MISC NOTES: Traffic: Although there's a minimum placement distance of 300m from the player you'll sometimes see the cars popping up. Traffic: You'll occasionally hear explosions around you. Don't panic. It's just vehicles exploding and civilians burning to death. New clones will replace them shortly. Traffic: Five vehicles is usually enough to simulate the traffic in any island. With more the chances of they bumping against each other, particularly on the initial placement, are too high, and you'll actually see less traffic than with less vehicles (as they keep being destroyed and relocated). Other: Expect huge house parties if there's just a couple of building with preset positions in a town. Other: Lots of civilians = less FPS. If you set your max population to 700 and you enter a "high" town expect a significant FPS drop. This script package places as many civilians as you want in the spots you want. No more, no less. CREDITS Functions: Backoff (createunit2.sqf) Liquid_Silence (distancepos3d.sqf) General Barron (nearestobj.sqf) Tophe of Östgöta Ops (randomBuildingPos.sqf) weasello (rndPosInRadius.sqf) toadlife (shuffle.sqf) Igor Drukov (getrelpos.sqf) bn880 (sortbubble.sqf) Scripts: Mr-Murray (teleport.sqs) Music: Dola Re Dola (by Devdas) <unidentified song> (by Amir Jan Saboori) Kopeika <extract> (by et_) CHANGELOG --- Use this, share this, modify this, whatever you want. Just put my name somewhere if you do so.
  21. Chain of Commands Network Services 2 (CoC NS2) How the hell does it work? Why use it? Because: Automatically generates and updates a list of all the players in a MP mission It’s able to broadcast strings, sides, arrays and multi-dimensional arrays globally, and virtually any data type including those supported by publicVariable (number, boolean, object, group) Can send data to all, specific clients, all clients or just the server Allows you to execute calls or functions sent from the server to clients and viceversa It’s able to share global arrays among server and clients Reduces the amount of global variables needed for clients in MP Eliminates the need of looped scripts and other synchronization methods Getting it The last version can be found here: http://www.ofpec.com/forum/index.php?PHPSESSID=h0tkc4h997vpefijgf0tc5el21&action=dlattach;topic=30650.0;attach=5472 If you get it from somewhere else make sure it's version 2.0, not 1.1. The latter should be avoided, as it's inferior in all aspects. Read the included Intro_to_CoC_NS_D2.pdf file, by the main coder of Sinews of War. It's short and simple, and good to have a general sense of this tool. Note that all his examples are focused on the exclusive use of fnRemoteCall, disregarding other methods. Setting it up For the addon version: NOT NEEDED IF YOUR MISSION USES COC UA: Place the CoC-SERVER logic in the editor (found in Game Logic -> CoC Utilities) For the script version: Copy the contents of CoCNS_2_0_ScriptTemplate.intro to your mission folder. It can be found inside the CoC NS 2 zip file. ONLY IF YOUR MISSION DOESN'T USE COC UA: Place a game logic in the editor and name it CoC_Server. Stuff you should know The official documentation can be found here: http://web.archive.org/web/20060112070534/http://www.thechainofcommand.com/docs/ Nodes: Nodes are connected sessions, listed in CoC_ClientList. That means that nodes actually refer to players, except for the case of the server when dedicated, which refers to a logic instead. Node index 0 is always the server (can be a player or a logic), node index 1 is the first player client, node 2 the second, etc. CoC_ClientsReady: Use this to check if CoC NS 2 is fully loaded before executing anything related to it. You'll probably just use it once, in an init script or somewhere along those lines. CoC_ClientList: 2D array listing all connected nodes. There's another equivalent global var, CoC_PeerList, so you can use whichever you like most. It has this format: [player object, player name, reserved var, connected]. The server is always at index 0. To retrieve the player object of the first client you would do something like this: (CoC_ClientList select 1) select 0. CoC_ClientChannel: It contains the index of the local node in CoC_ClientList. It’s stored locally, so its value will be different for each machine. fNSend: Use this to send stuff to specific nodes. Append "NO_NQ" if you want to send it ASAP, as it avoids the queue, and "NO_DISC" to ignore disconnected nodes. fNSendAll, fNSendClients and fNSendServer: Use them to send stuff to all nodes, just the clients or just the server, respectively. All of them share the same syntax and can use the "NO_NQ" and "NO_DISC" tags. fNSendGlobal: This seems to be the most optimized function to send data, so use it to send stuff to all or specific nodes when you aren't sending strings or sides, and if you don't need the "NO_DISC" and "NO_NQ" tags. Otherwise use either fNSend or fNSendAll. fNRemoteCall: Use this to execute calls on all or specific nodes. It only works with boolean, number, string, array and multi-dimensional array data types, though. CoC_isClient, CoC_isServer, CoC_isServerClient and CoC_isServerDedicated: Use them to know if the specific node is a client, a server (without specifics), a listen server or a dedicated server, respectively. Run the checks either locally or via fNRemoteCall. CoC_PublicArrays: Contains a list of all the arrays publicly shared. CoC_NSFunTable: Array containing all the custom functions you want to use in CoC NS2 There are way more interesting global vars and built-in functions, but those listed here are the ones I actually found more useful so far. So, how do I use all this? You have two main ways to share data. The one you'll probably use more often is by sending petitions to execute one of the custom functions referenced in CoC_NSFunTable, via fNSendAll, fNSendClients, etc. The other one is by using the public array system. You can also use fNRemoteCall, although it has more limitations than the both mentioned before. Custom functions Before getting into custom functions let me tell you that there's a few built-in ones present already, like: fNPing: Sends a ping request to the specified nodes fNPrint: Prints the specified data in the specified nodes. For debugging, mainly All the ones included are: "fNPing","fNPingr","fNCS","fNUP","fNPrint","fNBlank","fNClearQ","fNCall". Don't create new functions with any of those names, or you'll overwrite them and break all this. For other specific tasks you'll need to create and load the functions yourself and add them to the CoC_NSFunTable array. Before anything, you'll need to init the CoC_NSFunTable array if you are using the script version. It's initialized automatically in the addon one or if you use CoC UA in your mission. Anyway, I think it's good practice to check if this array exists before touching it: _null=format["%1",_nullstring]; ? (format["%1",CoC_NSFunTable]==_null) : CoC_NSFunTable=[] Then you load and add the functions to be used by CoC NS2, like this: ? (format["%1",fPlayAnim]==_null) : fPlayAnim = preprocessFile "fu\fPlayAnim.sqf", CoC_NSFunTable set [count CoC_NSFunTable,"fPlayAnim"] ? (format["%1",fSay]==_null) : fSay = preprocessFile "fu\fSay.sqf", CoC_NSFunTable = CoC_NSFunTable set [count CoC_NSFunTable,"fSay"] ? (format["%1",fClientChat]==_null) : fClientChat = preprocessFile "fu\fClientChat.sqf", CoC_NSFunTable = CoC_NSFunTable set [count CoC_NSFunTable,"fClientChat"] Those are just examples. You can add any function you want. Also, note that I make sure those functions aren't defined already. That's to avoid problems when two script packs which both use CoC NS2 are running together. Otherwise it'd add unneeded entries of functions to the CoC_NSFunTable array. Alternatively you could have done this: fPlayAnim = preprocessFile "fu\fPlayAnim.sqf" fSay = preprocessFile "fu\fSay.sqf" fClientChat = preprocessFile "fu\fClientChat.sqf" CoC_NSFunTable = ["fPlayAnim", "fSay", "fClientChat"] It actually doesn't matter, one way or the other. But if you want to avoid double entries the former method is preferred. What it does matter is to init all that in all clients and that the functions listed in CoC_NSFunTable are in the same order everywhere, so a good place for that would be in the init.sqs of your mission. Public Arrays You can share arrays publicly, so they can be automatically updated in all nodes and can also be edited by any of them. The public arrays are stored in the CoC_PublicArrays global var. It must be initialized manually in all nodes and all of them must be identical, so a good candidate is the init.sqs. To init CoC_PublicArrays you’d do something like this: globalArray1 = [] globalArray2 = [<stuff>] CoC_PublicArrays = ["globalArray1","globalArray2"] As you can see, CoC_PublicArrays is actually a reference to the arrays you want to be global. The arrays themselves can be either empty or not. You can always change their contents later and broadcast them via fPublicArray. To add a new array to CoC_PublicArrays after it's been initialized you'd need to do something like this: [[],{myNewGlobalArray = []; CoC_PublicArrays set [count CoC_PublicArrays, "myNewGlobalArray"]}] call fNRemoteCall And to remove one: [[],{NameOfTheArrayToDelete = nil; CoC_PublicArrays = CoC_PublicArrays - ["NameOfTheArrayToDelete"]}] call fNRemoteCall To modify a global array you'd use the built-in fPublicArray function, like this: oneOfTheGlobalArrays = oneOfTheGlobalArrays - [unusedObject] "oneOfTheGlobalArrays" call fPublicArray This way all the nodes will receive the request to update their respective versions of the oneOfTheGlobalArrays array with the content of the one of the node that is sending the request. Examples Killed EH The killed eventhandler is local to the computer the unit belongs to. That means that the server won't be aware of when a player is killed unless some looped scripts and global vars are used (which can be dozens depending on the amount of players). CoC NS2 allows to simplify all this by sending the message from the client to the server when the player is killed, so the server can act accordingly. This is a way of doing so: Initialize the CoC_NSFunTable global var: _null=format["%1",_nullstring]; ? (format["%1",CoC_NSFunTable]==_null) : CoC_NSFunTable=[] Create a custom function that will serve as a parser for the sent killed EH. For this example we'll name it fKilled.sqf and will place it in a directory named fu. The code of the function would look like this: private ["_unit","_killer"]; _unit = _this select 0; _killer = _this select 1; [_unit,_killer] exec "eh\killed_server.sqs"; Note that we'll be sending the unit and killer vars to a script named killed_server.sqs in the eh directory, but we could as well run our killed EH code here. Now we load the function this way: ? (format["%1",fKilled]==_null) : fKilled = preprocessFile "fu\fKilled.sqf", CoC_NSFunTable set [count CoC_PublicArrays, "fKilled"] The killed EH should have been added to the player's unit somewhere, like this: this addeventhandler ["killed", {_this exec "eh\killed.sqs"}] And in killed.sqs we put this: _unit = _this select 0; _killer = _this select 1; [[_unit,_killer],"fKilled"] call fNSendServer So, when a player client is killed this would happen: The player's killed EH script would run on his computer, and send a petition to the server to execute the fKilled function with the _unit and _killer vars passed. The server would receive the notification and execute the fKilled function, which in turn would execute the killed_server.sqs script locally This same system can be used to handle the hit EH, which is also local. Strings in global variables Strings are one of the data types not supported by publicVariable. With CoC NS2 we can update and synchronize its value to all nodes with something like this: [[],{myStringGlobalVar = "Some text here"}] call fNRemoteCall By using fNRemoteCall we'll execute the content in brackets in all nodes, including the server. We could have sent this to specific nodes by specifying the nodes, like: [[1,4],{myStringGlobalVar =... While we used a string in this example, this same system would work with global vars that contain any of the other data types supported by fNRemoteCall (booleans, numbers, arrays and multi-dimensional arrays). Notes Be aware that you won't be able to send objects as parameters with a fNRemoteCall. The call executed needs the object to be either local to the receiver or known globally. Something like this, where _unit is defined locally on the server, won't work: [[],"format [{%1 say %2},_unit,_what]"] call fNRemoteCall. By formatting _unit you will actually send the reference of the unit, not the unit object (the client will try to execute something like WEST 1-1-A:1 say phraseWhatever, which obviously won't work). So, if you want to execute something on a unit use a custom function instead, like this: [[_unit,_what],"fSay"] call fNSendAll. The fSay function must have been previously added to the CoC_NSFunTable array, and it would contain something like: _unit say _what; Alternatively, you could make use of the CoC_ClientChannel and CoC_ClientList vars, as shown in the examples in the Intro_to_CoC_NS_D2.pdf file. Drawbacks CoC NS2 can take a long time to load, particularly for the script version. Conflicts with CoC UA in the scripted version if a CoC_Server logic is manually placed in the editor -- Online PDF version of this guide: https://docs.google.com/file/d/0By2CaodBQ84GUTJfSVFyYW54alE/edit?usp=sharing -- Feel free to contribute to this guide and point out any wrong information or coding that could be improved. This guide will be updated in that respect as seen appropriate.
  22. SQUAD CONTROL (SQCTL) The goal of this tool is to provide mission makers an easy to use, easy to implement, way to control more than one squad or group at once. While this tool allows you to control an unlimited amount of squads (up to the hardcoded max of 63 groups per side) it’s mainly focused on scales from fireteam to platoon size. Anything beyond that can easily become a management nightmare, even with all the tools provided. I wouldn’t suggest going beyond company level, but it’s obviously up to you. Features Manage several groups at once, from fireteam level to company and above Keep track of the health status, current orders and position of all the squads under your control Issue orders to individual squads or to the groups they belong to Transfer units between any of the squads under your control Create new groups and assign squads to existing ones Rename your groups or squads to be easily identifiable The location of enemy squads will be broadcasted among each side Squads will move and follow the player in formation DOWNLOAD v1.0: http://www.mediafire.com/download.php?lu7473dgt6ddc97 Includes the template, a demo mission where you control a platoon and another one where you control several fireteams in a USMC squad (this one requires WW4). Requires USMC Symbols v1.2: - ftp://ftp.ofpr.info/ofpd/unofaddons2/USMCsymbols12.zip - http://www.ofpec.com/addons_depot/index.php?action=details&id=69 Installation Merge the template mission into yours Copy all the files and folders in the template mission (except mission.sqm) to your mission’s directory Edit the SQCTL_settings.sqf file you copied, if appropriate. Advanced: Instructions To put a squad under the player's control you'll have to add it first, using something like this: [<this group>,<nameOfTheSquad>,[<groupItBelongsTo>,<nameOfTheGroup>]] exec "SQCTL\addSq.sqs" So, if you want to add a squad to group number one you'd do something like this: [group this,"",[1]] exec "SQCTL\addSq.sqs" To add a squad to group number two you'd write: [group this,"",[2]] exec "SQCTL\addSq.sqs" etc If you'd like to name the squad you'd do something like this: [group this,"1st SQUAD",[1]] exec "SQCTL\addSq.sqs" And if you'd like to also name the first group you'd do: [group this,"1st SQUAD",[1,"1st PLATOON"]] exec "SQCTL\addSq.sqs" If you don't provide a name the squads and groups will be named automatically ("SQUAD <x>" and "GROUP<x>" respectively). To name groups you only have to provide the name in one of the squads. It doesn't matter if it's the first or the last. To issue an order to a squad or group: Click on the “ORDER†button to issue orders to the selected squad or group Select the order you want to issue from the combo box. Using the arrow buttons move the map where you want the squad or group to execute the order Click the “ISSUE†button Expanded instructions: Known Issues Sometimes an error will occur when issuing a follow or any order that requires a formation if the squads or group is already in one. This might occasionally stop the new formation script, forcing the player to repeat the order. This will be fixed in a future version. Notes This version isn’t MP compatible. This feature will be included in a future release. I’ve considered allowing the queue of several orders per group, but I finally discarded it. The goal of this tool is to provide a simple way to manage several squads at once, through simple orders. For other uses you should probably use something more feature-packed, such as the Command Engine or Drongo’s Toolkit. This tool makes extensive use of the forceMap and mapAnim commands. I always wanted to figure out their potential and decided this was a good project to try them out. While it has the big disadvantage of having to navigate by clicking buttons and not dragging with the mouse it allows me to forget about the headache inducing and easy to break onmapsingleclick. So far I like this, but if you think it's a nuance feel free to say so. Credits vektorboson (OFP script lib) Toadlife (formation_extended.sqs) Snypir (distancepos.sqf) bn880 (sortbubble.sqf) Drongo’s Toolkit and Command Engine for inspiration EXTRA Below it's the OFP Dialog Maker file I used to create this. Take it if you want to edit the appearance of this tool or add or remove features for your own use. Or whatever. DOWNLOAD OFP Dialog Maker save file : http://www.mediafire.com/download.php?dpxlp08347p9b2t
  23. * FOR OFP / CWA * DOWNLOAD v1.2.1: http://www.mediafire.com/download.php?7v5rc5rappo4rtg The linked file includes a template and a demo mission. The goal of this script pack is to provide an addon-free and easy to use way of including suppressive fire in user missions. Every time a shot is fired the position of the bullet will be checked at given intervals, until it disappears or impacts. If the bullet comes close enough to a unit the suppression level of that unit will raise. If the suppression level is high enough that unit will either have their fire rate reduced or immediately lay down and stop doing anything. Only the most skilled ones will have a chance to keep crawling or keep firing. In addition to this, units detecting an incoming grenade will try to run away from it. FEATURES Every single bullet is checked for suppression Two levels of suppression: moderate and full Suppressed units will fire at a considerable reduced rate Fully suppressed units are forced to lay down Only very skilled units will have a chance to return fire and/or move when fully suppressed Units will try to run away from incoming grenades, if they detect them While any weapon can suppress, MGs, LMGs and sniper rifles have a bigger suppression effect Secondary weapons won't suppress Specific units can be excluded from being suppressed, including players Vehicles and their crews are unaffected by suppression, but can inflict it Killing or damaging an enemy unit will raise the suppresion levels of its nearby allies Works both in SP and MP (optional) Very skilled units may have a chance of skipping suppression altogether (for that given bullet) (optional) Fleeing units can be automatically excluded from suppression (you might want to use this for compatibility with some missions) INSTRUCTIONS In order to use kSuppression in your mission follow these steps: Merge the template mission into yours. Copy all the folders and files in the template mission to that of your mission If you plan to only use this for single player you can skip the CoC NS 2 ones. So you could just copy: kSupp, kScustom and ofp_scriptlib If you have your own "stringtable.csv" copy/paste its contents to the end of your own. Adjust the options to your liking in the "kSupp_settings.sqf" file Add this line to the init of any empty vehicle (that includes static machine guns): [this] exec "kSupp\prepEmptyVeh.sqs" Advanced: NOTES Only MGs, LMGs and sniper rifles have a reliable suppression effect. Suppressing with ARs or pistols will require significantly more effort This pack only uses a single global variable, and a few others for functions, etc, so it shouldn't cause any savegame bug CoC NS 2 is only used if the mission is detected to be played in MP. In that environment this whole system won't start working until CoC NS 2 loads properly and the suppression scripts are initialized. For SP this wait will be significantly shorter, as CoC NS 2 won't be used. KNOWN ISSUES Sometimes units are caught between bullet position checks and aren't suppressed. That also applies to those near to bullet impact points. Empty vehicles will be assigned the fired EH twice if manned before being registered in the kSupp array Suppressive fire affects units of all sides but those belonging to the one of the suppressing unit. So, in situations where two sides are fighting together they may end up suppressing each other. CHANGELOG CREDITS Chain of Command team (for CoC NS 2, probably the best system for server/client synching) Vektorboson (for ofp_scriptlib, a varied, lighteweight and generally awesome pack of functions) Igor Drukov and his bro (for getrelpos.sqf) Drongo69 (for the script to register groups, and for support and inspiration in general) TPWC AI suppression system (the idea to use balls over units for debugging and different suppression levels comes from there) ECP (for using an array to store global values without creating SP savegame crash) SLX (for the simple yet effective way to detect null vars and general inspiration on suppression) Have in mind that those are the ones I've kept track of and/or remember. It's more than likely many others that should be credited here. If you feel that you or someone else should be added just let me know and I'll update the credits accordingly. DOWNLOAD v1.2.1: - http://www.mediafire.com/download.php?7v5rc5rappo4rtg Older versions:
×