Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

McSpuds

Member
  • Content Count

    29
  • Joined

  • Last visited

  • Medals

Everything posted by McSpuds

  1. I have searched through so many threads my eyes hurt. Does anybody know how I can add a altimeter to my HALO script? I would love to use what is in DomiOA but I can never get it to work. Too many pieces and I am not good at coding. Here is what I am using: Flagpole code this addAction["HALO","flagpoleHALO.sqf"]; sqf script haloed = true; hintSilent "Click on the map where you'd like to HALO."; onMapSingleClick "player setPos _pos; [player, 2000] exec 'ca\air2\halo\data\Scripts\HALO_init.sqs';haloed = false;hint 'Close the map and don''t forget to open your chute!'"; waitUntil{!haloed}; onMapSingleClick "";
  2. I had to break my squads down and use it for individual units. Took a lot of doing but she works. My problem that I can not get to work is the murk_spawn.sqf and the Norrin Revive script. They have a conflict someplace and will not work together.
  3. I am trying to create a "Search and Rescue" mission for a downed pilot. If possible I would like to have team members see the pilot eject. How can I force a AI pilot to eject from the aircraft? I have been setting the damage level to almost max to get a good smoke trail for the bird mut can not seam to get pilot to eject.
  4. use this code along with the "visual house id" mod listed below. The MOD is a must have tool. nul = [this,triggername,"once",1,1,"unitname setPos ((position this nearestObject 8389) buildingPos 8)"] execVM "murk_spawn.sqf"; this disableai "MOVE"; http://www.armaholic.com/page.php?id=11288 hope this helps ---------- Post added at 10:05 AM ---------- Previous post was at 10:05 AM ---------- although I know it works for individual units, not sure about groups.
  5. Thanxs, that did it. I placed a empty aircraft on the runway and named it "plane1". I then created the pilot named "pilot1" and placed him next to the aircraft. I made the first pilot waypoint a "HOLD" and then the next one a "GET IN NEAREST" I placed both these wp's on the aircraft nose. Then ran out way points to get aircraft to mission area. I set a trigger in the mission area synced to the "Hold" waypoint and set as a "switch". This way when the trigger gets activated the "Hold" waypoint is deleted and the pilot gets in the aircraft and takes off. I then set the eject trigger with the code below added in the on act: , then placed the trigger were I wanted the pilot to eject. Worked great! Here is the code with names changed: pilot1 = driver plane1; UnAssignVehicle pilot1; pilot1 action ["EJECT", plane1]; :bounce3::bounce3: ---------- Post added at 09:58 AM ---------- Previous post was at 09:57 AM ---------- Now I need to go search for commands to get the pilot to join search team when they arrive at his location..
  6. McSpuds

    Revive Script

    I have been using revive now. Working good, Now if I try to use it with Murklor's respawn scrip that respawns AI off of triggers, the respawn fails to work. Both scripts work independently, just not together. Any suggestions? Murklor's script: // File: murk_spawn.sqf // Function: To allow for simple trigger based spawning using editor placed units and waypoints. // The script deletes all units when the mission start and the recreate them on command. // Parameters: // _this select 0: OBJECT - unit name (this) // _this select 1: OBJECT - trigger name // _this select 2: STRING - spawn type ("once","repeated","wave" and "reset") // _this select 3 (optional): NUMBER - spawn lives (the amount of time the unit respawns, or wave number) // _this select 4 (optional): NUMBER - spawn delay // _this select 5 (optional): STRING - init string called for the leader of the group // _this select 6 (optional): NUMBER - delay before body removal // // Usage: // Example trigger: Anybody Once (or whatever you want), onActivation: this setVariable ["murk_spawn",true,true]; // Unit (leader of group): nul = [this,triggername,"once"] exec "murk_spawn.sqf"; // init.sqf: triggername setVariable ["murk_spawn",false,false]; // // V5 // - Change: Removed group and function scripts, everything done in a single file // - Change: Spawn trigger variable is now a setVariable of the trigger instead of a global variable // - Add: Option to enable removal of dead units, eventhandler attached to everyone spawning // - Fix: Should now work in multiplayer on a dedicated server (only tested on a local dedicated/join setup however) // - Fix: Performance issues with helos from V4 resolved, was a mistake on the example mission and not the script // - Fix: Some minor bugs with the optional parameters // - Fix: Now properly support crews in turrets-on-turrets (had to bring in some BIS made functions) // V4 // - Change: No longer requires the BIS functions module // - Add (again): Like V2, it saves the weapons and magazines and restore them // - Fix: squad leader init is now fired after the creation of the entire group, can manipulate squad members with init // - Change: Removed the external paradrop script, its down with a [] spawn in the waypoint. Just trying out different things :) // V3 // - See older versions // This script is serverside if(!isServer) exitWith {}; // ------------------- Init ----------------------- // _bodyRemovalTime = 400; _bodyRemoval = false; _spawnLives = 1; _spawnDelay = 0.1; _waitingPeriod = 10; // Change this for the default waiting period _resetPeriod = 20; // Change this for the reset mode paus _initString = ""; _countThis = count _this; // ---------------- Parameters -------------------- // _unit = _this select 0; _trigger = _this select 1; _spawntype = _this select 2; if (_countThis >= 4) then { _spawnlives = _this select 3; }; // Optional if (_countThis >= 5) then { _spawndelay = _this select 4; }; // Optional if (_countThis >= 6) then { _initString = _this select 5; }; // Optional if (_countThis >= 7) then { _bodyRemovalTime = _this select 6; _bodyRemoval = true; }; // Optional // -- Delete the unit (this is always done ASAP) -- // // Check if its a vehicle _vehicle = false; if (_unit isKindOf "LandVehicle" OR _unit isKindOf "Air") then { _vehicle = true; }; // Unit information arrays _unitPosArray = []; _unitTypeArray = []; _unitSkillArray = []; _unitNameArray = []; _unitRankArray = []; _unitMagArray = []; _unitWeaponArray = []; _unitCrew = []; _unitsInGroupAdd = []; _unitGroup = group _unit; _unitsInGroup = units _unitGroup; _unitOrigDir = getDir _unit; // Save the vehicle types, positions and skills for the group if (_vehicle) then { { _vcl = vehicle _x; if (!(_vcl in _unitsInGroupAdd) AND (typeOf _vcl != "")) then { _crew = crew _vcl; _unitCrewTemp = []; { _unitCrewTemp = _unitCrewTemp + [typeOf _x]; } forEach _crew; _unitCrew = _unitCrew + [_unitCrewTemp]; _unitTypeArray = _unitTypeArray + [typeOf _vcl]; _unitPosArray = _unitPosArray + [getPos _vcl]; _unitSkillArray = _unitSkillArray + [skill _vcl]; _unitNameArray = _unitNameArray + [vehiclevarName _vcl]; _unitRankArray = _unitRankArray + [rank _vcl]; _unitsInGroupAdd = _unitsInGroupAdd + [_vcl]; _unitMagArray = _unitMagArray + [magazines _vcl]; _unitWeaponArray = _unitWeaponArray + [weapons _vcl]; { // Delete the crew and vehicle deleteVehicle _x; } forEach _crew; deleteVehicle _vcl; }; sleep 0.01; // Need this or it all f**k up } forEach _unitsInGroup; } // Save the infantry types, etc else { { _unitTypeArray = _unitTypeArray + [typeOf _x]; _unitPosArray = _unitPosArray + [getPos _x]; _unitSkillArray = _unitSkillArray + [skill _x]; _unitNameArray = _unitNameArray + [vehiclevarName _x]; _unitRankArray = _unitRankArray + [rank _x]; _unitMagArray = _unitMagArray + [magazines _x]; _unitWeaponArray = _unitWeaponArray + [weapons _x]; deleteVehicle _x; sleep 0.01; // Same as with vehicles } forEach _unitsInGroup; }; // ----------------- Functions -------------------- // // *WARNING* BIS FUNCTION RIPOFF - Taken from fn_returnConfigEntry as its needed for turrets and shortened a bit _fnc_returnConfigEntry = { private ["_config", "_entryName","_entry", "_value"]; _config = _this select 0; _entryName = _this select 1; _entry = _config >> _entryName; //If the entry is not found and we are not yet at the config root, explore the class' parent. if (((configName (_config >> _entryName)) == "") && (!((configName _config) in ["CfgVehicles", "CfgWeapons", ""]))) then { [inheritsFrom _config, _entryName] call _fnc_returnConfigEntry; } else { if (isNumber _entry) then { _value = getNumber _entry; } else { if (isText _entry) then { _value = getText _entry; }; }; }; //Make sure returning 'nil' works. if (isNil "_value") exitWith {nil}; _value; }; // *WARNING* BIS FUNCTION RIPOFF - Taken from fn_fnc_returnVehicleTurrets and shortened a bit _fnc_returnVehicleTurrets = { private ["_entry","_turrets", "_turretIndex"]; _entry = _this select 0; _turrets = []; _turretIndex = 0; //Explore all turrets and sub-turrets recursively. for "_i" from 0 to ((count _entry) - 1) do { private ["_subEntry"]; _subEntry = _entry select _i; if (isClass _subEntry) then { private ["_hasGunner"]; _hasGunner = [_subEntry, "hasGunner"] call _fnc_returnConfigEntry; //Make sure the entry was found. if (!(isNil "_hasGunner")) then { if (_hasGunner == 1) then { _turrets = _turrets + [_turretIndex]; //Include sub-turrets, if present. if (isClass (_subEntry >> "Turrets")) then { _turrets = _turrets + [[_subEntry >> "Turrets"] call _fnc_returnVehicleTurrets]; } else { _turrets = _turrets + [[]]; }; }; }; _turretIndex = _turretIndex + 1; }; }; _turrets; }; // Eventhandler for removal of dead units _fnc_removeBodyEH = { (_this select 0) addEventHandler ["killed", { [_this select 0] spawn { _unit = _this select 0; _origPos = getPos _unit; _z = _origPos select 2; _desiredPosZ = (_origPos select 2) - 3; if (_unit iskindOf "Man") then { _desiredPosZ = (_origPos select 2) - 0.6; }; // Dont need to sink so far if its infantry _sleep = _unit getVariable "murk_bodyremovaltime"; sleep _sleep; if ( vehicle _unit == _unit) then { _unit enableSimulation false; while { _z > _desiredPosZ } do { _z = _z - 0.01; _unit setPos [_origPos select 0, _origPos select 1, _z]; sleep 0.1; }; }; deleteVehicle _unit; }; } ]; }; // This is spawned as an independant function if wave or reset mode is used _fnc_deleteGroup = { _group = _this select 0; _unitsGroup = units _group; while { ({alive _x} count _unitsGroup) > 0 } do { sleep 5; }; deleteGroup _group; }; // This function spawns/respawns the unit _fnc_spawnUnit = { // We need to pass the old group so we can copy waypoints from it, the rest we already know _oldGroup = _this select 0; _newGroup = createGroup (side _oldGroup); _newGroup copyWaypoints _oldGroup; // Since "wave" and "reset" mode may still have the old unit alive, we cannot delete their group directly if (_spawnType == "once" OR _spawnType == "repeated") then { deleteGroup _oldGroup; } else { [_oldGroup] spawn _fnc_deleteGroup; }; if (_vehicle) then { for [{ _loop = 0 },{ _loop < count _unitTypeArray},{ _loop = _loop + 1}] do { _spawnUnit = Object; if ((_unitPosArray select _loop) select 2 >= 10) then { _spawnUnit = createVehicle [(_unitTypeArray select _loop),(_unitPosArray select _loop), [], 0, "FLY"]; //Set a good velocity in the correct direction (taken from BIS functions) _spawnUnit setVelocity [50 * (sin _unitOrigDir), 50 * (cos _unitOrigDir), 0]; } else { _spawnUnit = (_unitTypeArray select _loop) createVehicle (_unitPosArray select _loop); }; _spawnUnit setDir _unitOrigdir; _seatLoop = 0; // Need a little sleep or units may spawn on top of the vehicle sleep 0.1; _crew = []; // Create the entire crew { _unit = _newGroup createUnit [_x,(_unitPosArray select _loop), [], 0, "NONE"]; _crew = _crew + [_unit]; } forEach (_unitCrew select _loop); // We assume that all vehicles have a driver, the first one of the crew (_crew select 0) moveInDriver _spawnUnit; _currentCrewMember = 1; // Count the turrets _entry = configFile >> "CfgVehicles" >> (_unitTypeArray select _loop); _turrets = [_entry >> "turrets"] call _fnc_returnVehicleTurrets; // Move the rest of the crew into turrets _funcMoveInTurrets = { private ["_turrets","_path","_i"]; _turrets = _this select 0; _path = _this select 1; _i = 0; while {_i < (count _turrets)} do { _turretIndex = _turrets select _i; _thisTurret = _path + [_turretIndex]; //Move unit into turret, if empty. if (isNull (_spawnUnit turretUnit _thisTurret)) then { (_crew select _currentCrewMember) moveInTurret [_spawnUnit, _thisTurret]; _currentCrewMember = _currentCrewMember + 1; }; //Spawn units into subturrets. [_turrets select (_i + 1), _thisTurret] call _funcMoveInTurrets; _i = _i + 2; }; }; [_turrets, []] call _funcMoveInTurrets; _newGroup addVehicle _spawnUnit; _spawnUnit setSkill (_unitSkillArray select _loop); _spawnUnit setUnitRank (_unitRankArray select _loop); // Set the unit name if (_spawntype == "once" OR _spawntype == "repeated") then { _spawnUnit setVehicleVarName (_unitNameArray select _loop); if (vehiclevarname _spawnUnit != "") then { _spawnUnit setVehicleInit format["%1=this;",_unitNameArray select _loop]; processInitCommands; }; }; // Add dead body removal eventhandler if (_bodyRemoval) then { _spawnUnit setVariable ["murk_bodyRemovalTime", _bodyRemovalTime, false]; nul = [_spawnUnit] call _fnc_removeBodyEH; { _x setVariable ["murk_bodyRemovalTime", _bodyRemovalTime, false]; nul = [_x] call _fnc_removeBodyEH; } forEach _crew; }; }; } else { for [{ _loop = 0 },{ _loop < count _unitTypeArray},{ _loop = _loop + 1}] do { (_unitTypeArray select _loop) createUnit [_unitPosArray select _loop,_newGroup]; _unitsGroup = units _newGroup; _spawnUnit = (_unitsGroup select _loop); // We know that the current unit being worked on is the latest unit added to the group if (_spawnUnit == leader _newGroup) then { _spawnUnit setDir _unitOrigDir }; _spawnUnit setSkill (_unitSkillArray select _loop); _spawnUnit setRank (_unitRankArray select _loop); removeAllWeapons _spawnUnit; {_spawnUnit removeMagazine _x} forEach magazines _spawnUnit; removeAllItems _spawnUnit; {_spawnUnit addMagazine _x} forEach (_unitMagArray select _loop); {_spawnUnit addWeapon _x} forEach (_unitWeaponArray select _loop); _spawnUnit selectWeapon (primaryWeapon _spawnUnit); sleep 0.1; // Set the unit name if (_spawntype == "once" OR _spawntype == "repeated") then { _spawnUnit setVehicleVarName (_unitNameArray select _loop); if (vehiclevarname _spawnUnit != "") then { _spawnUnit setVehicleInit format["%1=this;",_unitNameArray select _loop]; processInitCommands; }; }; // Add dead body removal eventhandler if (_bodyRemoval) then { _spawnUnit setVariable ["murk_bodyRemovalTime", _bodyRemovalTime, false]; nul = [_spawnUnit] call _fnc_removeBodyEH; }; }; }; // setting the leaders init (vehicle (leader _newGroup)) setVehicleInit _initString; processInitCommands; // Have to return the new group _newGroup; }; // -------------- Waiting period ------------------ // while { !(_trigger getVariable "murk_spawn") } do { sleep _waitingPeriod; }; // --------------- Spawn Modes ------------------- // // REPEAT MODE, ie basic respawn based on lives if (_spawntype == "repeated") then { while { _spawnlives > 0 } do { _unitGroup = [_unitGroup] call _fnc_spawnUnit; _spawnLives = _spawnLives - 1; _unitsGroup = units _unitGroup; while { ({alive _x} count _unitsGroup) > 0 } do { sleep 2; }; sleep _spawndelay; }; }; // WAVE MODE, this is fairly simple, just sleep a while then respawn. Spawnlives in this case is number of waves if (_spawntype == "wave") then { while { _spawnlives > 0 } do { _unitGroup = [_unitGroup] call _fnc_spawnUnit; _spawnLives = _spawnLives - 1; sleep _spawndelay; }; }; // RESET MODE, sleep a while then set the variable to false (even if you set it like 50 times over). Spawn lives is used to tick how many times its possible to reset. if (_spawntype == "reset") then { while { _spawnlives > 0 } do { _unitGroup = [_unitGroup] call _fnc_spawnUnit; _spawnLives = _spawnLives - 1; sleep _resetPeriod; _trigger setVariable ["murk_spawn",false,false]; while { !(_trigger getVariable "murk_spawn") } do { sleep _waitingPeriod; }; }; }; // ONCE MODE if (_spawntype == "once") then { _unitGroup = [_unitGroup] call _fnc_spawnUnit; };
  7. OK, now I have a whole new problem. I use Murklor's respawn and I use Norrin's revive script. I am using both of these scripts in missions and they work great. But if I put them both in the same mission the murk_spawn.sqf will not work. Any suggestions?
  8. McSpuds

    Revive Script

    I have a problem getting the revive to work on our server in a mission. If we run the mission on my computer it works great. But when loaded up on our server at AOWC it crashes the server. Here is my Description, Init, and Revive files. Can somebody see if anything is wrong for me? Description.ext // Mission Header class Header { gameType = Coop; minPlayers = 1; maxPlayers = 10; }; onLoadMission = "ESCORT"; OnLoadMissionTime = FALSE; // description.ext settings for revive /////////////////////////////////////////////////////////////////////////////////////////// respawn = "BASE"; respawndelay = 4; disabledAI = 0; #include "revive_sqf\dialogs\config.cpp" #include "revive_sqf\dialogs\define.hpp" #include "revive_sqf\dialogs\rev_cam_dialog.hpp" #include "revive_sqf\dialogs\respawn_button_1.hpp" #include "revive_sqf\dialogs\respawn_button_2.hpp" #include "revive_sqf\dialogs\respawn_button_3.hpp" #include "revive_sqf\dialogs\respawn_button_4.hpp" #include "revive_sqf\dialogs\respawn_button_1b.hpp" #include "revive_sqf\dialogs\respawn_button_1c.hpp" #include "revive_sqf\dialogs\respawn_button_2b.hpp" #include "revive_sqf\dialogs\respawn_button_3b.hpp" #include "revive_sqf\dialogs\respawn_button_4b.hpp" #include "revive_sqf\dialogs\respawn_button_1map.hpp" #include "revive_sqf\dialogs\respawn_button_2map.hpp" #include "revive_sqf\dialogs\respawn_button_3map.hpp" #include "revive_sqf\dialogs\respawn_button_4map.hpp" #include "revive_sqf\dialogs\OK_map.hpp" #include "revive_sqf\dialogs\dead_cam_dialog.hpp" #include "revive_sqf\dialogs\rev_cam_dialog_blank.hpp" /////////////////////////////////////////////////////////////////////////////////////////// class Params { class DayTime { //paramsArray[0] title = "Time Of Day"; values[] = {-6, 0, 8, 13}; texts[] = {"Morning", "Clear day", "Sundown", "Night"}; default = 0; }; class Revive { // paramsArray[1] title = "Number of Revives:"; values[] = {2000,1000,20,10,7,5}; texts[] = {"No Revive","Infinite - Cadet","20 - Easy ","10 - Normal","7 - Hard","5 - Extreme"}; default = 10; }; }; Init.sqf: //begin init.sqf //Initialise revive script (this next line is needed for revive script) server execVM "revive_init.sqf"; //Mission parameters skiptime (paramsArray select 0); execVM "briefing.sqf"; if(true) exitWith {}; //helo evac init.sqf [slick1] execVM "scripts\heloGoTo\heloGoTo_init.sqf"; // For extraction action at start-up player setVariable ["NORRN_taxiHeli", slick1, true]; //NORRN_aerialTaxiRespawnOff = true; NORRN_noAerialTaxiAtStart = true; execVM "scripts\billowing.sqf"; execVM "scripts\billowing2.sqf"; trigger1 setVariable ["murk_spawn",false,false]; trigger2 setVariable ["murk_spawn",false,false]; trigger3 setVariable ["murk_spawn",false,false]; trigger4 setVariable ["murk_spawn",false,false]; trigger5 setVariable ["murk_spawn",false,false]; trigger6 setVariable ["murk_spawn",false,false]; trigger7 setVariable ["murk_spawn",false,false]; trigger8 setVariable ["murk_spawn",false,false]; trigger9 setVariable ["murk_spawn",false,false]; trigger10 setVariable ["murk_spawn",false,false]; trigger11 setVariable ["murk_spawn",false,false]; trigger12 setVariable ["murk_spawn",false,false]; trigger13 setVariable ["murk_spawn",false,false]; trigger14 setVariable ["murk_spawn",false,false]; trigger15 setVariable ["murk_spawn",false,false]; trigger16 setVariable ["murk_spawn",false,false]; revive.init.sqf: /* CO & OA REVIVE SCRIPT © SEPTEMBER 2010 - norrin ([email protected]) Version: 0.49 ArmA2 ******************************************************************************************************* See release notes for details on contributors and instructions for incorporating revive scripts into your own missions ************************************************************************************ Start revive_init.sqf */ // ===================================================================================================================== // DO NOT MODIFY THIS CODE // ===================================================================================================================== // sickboy's code modified by _xeno T_INIT = false; T_Server = false; T_Client = false; T_JIP = false; T_MP = (if (playersNumber east + playersNumber west + playersNumber resistance + playersNumber civilian > 0) then {true} else {false}); if (isServer) then { T_Server = true; if (!isNull player) then {T_Client = true}; T_INIT = true; } else { T_Client = true; if (isNull player) then { T_JIP = true; [] spawn {waitUntil {!isNull player};T_INIT = true}; } else { T_INIT = true; }; }; waitUntil {T_INIT}; // ===================================================================================================================== // THE FOLLOWING CODE CAN BE MODIFIED // ===================================================================================================================== // GENERAL REVIVE OPTIONS (Off = 0, On = 1) _mission_end_function = 0; //array no.0 - mission ends when all players are unconscious _call_out_function = 1; //array no.6 - whether a unit calls out while unconscious _water_dialog = 1; //array no.45 - whether a dialog appears when a unit dies in water so that it can auto wash ashore _unconscious_drag = 1; //array no.39 - whether a unit can drag the bodies of unconscious players _load_wounded = 1; //array no.61 - allows you to load unconscious units on vehicles _altUnc_animation = 1; //array no.54 - use alternate revive animation _JIP_spawn_dialog = 0; //array no.2 - whether a dialog appears when a player JIP so that he can be transported to a spawn point near the action _time_b4_JIP_spawn_dialog = 10000; //array no.17 - time before the respawn dialog appears for JIP players _perpetual_server = 0; //array no.62 - NOT IMPLEMENTED _ACE_mod = 0; //array no.102 - NOT IMPLEMENTED - Currently a place holder for possible future functionality // ================================================================== // LIST OF PLAYABLE UNITS //NORRN_player_units = playableUNits; NORRN_player_units = [s1,s2,s3,s4,s5,s6,s7,s8,s9,s10]; // ================================================================== // WELCOME SCREEN //titleText ["Joining the Revive Test Mission\n\n(Make sure you check the mission notes for details on how the scripts work\nand the revive_readMe in the attached pdf file for the full notes on implementing \nthe scripts in your own missions and the options available)", "BLACK FADED", 0.6]; // This next line can be commented out or removed if it interferes with intro movies // ================================================================== // REVIVE OPTIONS _max_respawns = (paramsArray select 1); //array no.38 - Number of lives per unit _JIP_respawns = [2,30]; //array no.63 - 0 - off or the number of lives players receive when they join in progress , JIP time after the mission starts _revive_timer = 1; //array no.7 - Whether you want to limit the amount of timer a player has while unconscious _revive_time_limit = 300; //array no.27 - Amount of time a player remains unconscious before respawning or dying _revive_damage = 0; //array no.37 - Unit's level of damage following revive _unconscious_markers = 1; //array no. 4 - Whether a marker appears on the game map at the location of the unconscious unit _caseVAC = [1, ["MASH","HMMWV_Base"]]; //array no.64 - Allows units to be taken to a hospital etc to be revived _mediVAC = []; //array no.65 - NOT IMPLEMENTED _chance_ofDeath = [0,0]; //array no.66 - Two parameters in the array the first switches off/on (0/1) chance of death when shot, increases dues to hit location and number of times revived and the second parameter switches on/off the decreasing respawn timer based on how many times you have been revived, if using set respawn-time to at least 300 seconds. _dualTimer = 0; //array no.67 - NOT IMPLEMENTED - normal units can only revive for eg 30 seconds whereas medics can heal players up to 120 secs - array - [0/1 - off/on, revive timer for normal unit, timer for medic] _deadSpectator_cam = 1; //array no.92 - leave as 0 - whether a unit can spectate other friendly units when it has run out of lives // ================================================================== // RESPAWN OPTIONS _no_respawn_points = 2; //array no.12 - no of respawn points (Max number 4) _Base_1 = "Mobile"; //array no.13 - spawn position names _Base_2 = "Start"; //array no.14 _Base_3 = ""; //array no.15 _Base_4 = ""; //array no.16 _Base_free_respawn = [1,1,0,0]; //array no.36 - select whether to allow respawning at spawn points even if enemy troops are present (options OFF = 0, ON = 1) _respawn_at_base_addWeapons = 0; //array no.11 - unit respawns with weapons it commenced the mission with _respawn_at_base_magazines = []; //array no.34 - If using the respawn_at_base_addWeapons option then place the magazine and weapon _respawn_at_base_weapons = []; //array no.35 types in the following arrays, if left blank respawns with weapons from mission start _respawn_position = 2; //array no.28 - 0 - respawn at base_1; 1 - the closest enemy free respawn point; 2 - players choice; and 3 - dies _respawnAtBaseWait = [0,0]; //array no.68 - Two parameters: 1st if = 1 makes players that respawn at base wait for (parameter 2) seconds before being able to see surroundings _objectiveBasedRP = []; //array no.69 - NOT IMPLEMENTED // Mobile Spawn Settings _mobile_spawn = 1; //array no.51 - set to 1 if you want to use mobile spawn //_mobile_base_start = "Insertion"; //array no.52 - NO LONGER NEEDED, REDUNDANT VARIABLE _mobile_base2_start = ""; //array no.70 - NOT IMPLEMENTED _mobile_type = 1; //array no.60 - set as 0 - for vehicle and 1 for man _mobile_man = s1; //array no.53 - place name of unit here or if not used make sure set as objNull _mobile_man2 = objNull; //array no.71 - NOT IMPLEMENTED // ================================================================== // UNITS THAT CAN REVIVE/UNITS THAT CAN BE REVIVED _can_revive = "soldierWB"; //array no.18 _can_revive_2 = ""; //array no.19 _can_revive_3 = ""; //array no.72 - NOT IMPLEMENTED _can_revive_4 = ""; //array no.73 - NOT IMPLEMENTED _can_be_revived = "soldierWB"; //array no.20 _can_be_revived_2 = ""; //array no.21 _can_be_revived_3 = ""; //array no.74 - NOT IMPLEMENTED _can_be_revived_4 = ""; //array no.75 - NOT IMPLEMENTED _medic_1 = "USMC_Soldier_Medic"; //array no.76 - Used in conjunction with medpacks and bleeding _medic_2 = ""; //array no.77 - Used in conjunction with medpacks and bleeding _medic_3 = ""; //array no.78 - NOT IMPLEMENTED _medic_4 = ""; //array no.79 - NOT IMPLEMENTED //======================================================== // MEDPACK AND BLEEDING OPTIONS _medpacks = 0; //array no.80 - Whether you want to give the units a limited number of revive kits 0/1 - no/yes _stabilisation = 0; //array no.81 - NOT IMPLEMENTED _bleeding = 1; //array no.82 - Make units bleed and require bandages _medic_medpacks = 5; //array no.83 - No of medpacks for units specified in the _medic variables - they are required for reviving units _unit_medpacks = 3; //array no.84 - No of medpacks for units specified in the _can_revive variables - they are required for reviving units _medic_bandages = 5; //array no.85 - Bandages stop bleeding _unit_bandages = 3; //array no.86 - _medic_stable = 0; //array no.100 - NOT IMPLEMENTED _unit_stable = 0; //array no.101 - NOT IMPLEMENTED _stabTime_tillDeath = 0; //array no.87 - NOT IMPLEMENTED //Time until death following revive without stabilisation // ================================================================== // ENEMY SIDE TO PLAYABLE UNITS _no_enemy_sides = 1; //array no.22 - No of Enemy sides (0, 1 or 2). _enemy_side_1 = "EAST"; //array no.23 - Enemy sides can be "EAST", "WEST", "GUER" etc _enemy_side_2 = ""; //array no.24 _enemy_side_3 = ""; //array no.88 - NOT IMPLEMENTED _enemy_side_4 = ""; //array no.89 - NOT IMPLEMENTED // ================================================================== // FRIENDLY SIDE TO PLAYABLE UNITS _allied_side_1 = "WEST"; //array no.42 - Friendly sides can be "EAST", "WEST","RESISTANCE" etc. _allied_side_2 = "WEST"; //array no.43 - If all players are from the same side make sure you set the same side for both variables eg "WEST", "WEST" _allied_side_3 = ""; //array no.90 - NOT IMPLEMENTED _allied_side_4 = ""; //array no.91 - NOT IMPLEMENTED // ================================================================== // UNCONSCIOUS CAMERA OPTIONS _follow_cam = 1; //array no.5 - option to allow viewing of friendly units while unconscious _follow_cam_distance = 250; //array no.32 - the range that unconscious players can spectate friendly units _follow_cam_team = 0; //array no.44 - set to 1 if you wish unconscious players only to spectate players within NORRN_player_units array _top_view_height = 70; //array no.55 - allows you to set the top down camera height _visible_timer = 1; //array no.41 - view a cound-down timer while unconscious _unconscious_music = 0; //array no.46 - music must appear as unc_theme in music.hpp // ================================================================== // RESPAWN DIALOG OPTIONS _nearest_teammate_dialog = 0; //array no.3 - whether a respawn dialog appears when there are no players within this distance _all_dead_dialog = 0; //array no.1 - whether a respawn dialog appears when all players are unconscious (_all_dead_player = 1) _respawn_button_timer = 0; //array no.25 - Time until respawn button appears (0 = approx. 12 seconds), NB: Set to a high number like 100000 seconds if you do not want _distance_to_friend = 250; //array no.26 - If the closest friendly unit is further than this distance away trigger respawn dialog _all_dead_player = 0; //array no.56 _all_dead_distance = 10000; //array no.57 - whether a respawn dialog appears when all players within a specified distance are unconscious (_all_dead_player = 1) // ================================================================== // Bonus life for aiding team mates function _reward_function = 1; //array no.96 - specify whether a unit receives bonus lives for reviving other players _revives_required = 1; //array no.97 - Number of revives required before recieving a bonus life // ================================================================== // Team kill function _team_kill_function = 1; //array no.98 - specify whether a unit loses a life for killing team mates _no_team_kills = 1; //array no.99 - Number of teamkills before punishment // ================================================================== // CONFIGURABLE OPTIONS FOR HEAL YOURSELF FUNCTION _heal_yourself = 1; //array no.8 - whether a unit can heal damage to itself _no_of_heals = 1; //array no.29 - Number of heals that each player gets during a mission _lower_bound_heal = 0.1; //array no.30 - The damage level range between which the heal action becomes available _upper_bound_heal = 0.8; //array no.31 // ================================================================== // AI REVIVE BEHAVIOUR OPTIONS _goto_revive = 0; //array no. 9 - closest AI automatically moves to revive a downed team mate _AI_smoke = 0; //array no. 40 - if available reviving AI throws smoke on downed AI position _AI_aware = 1; //array no. 49 - AI will clear an enemy units it is aware of before auto reviving _AI_cover = 1; //array no. 50 - second AI unit moves with AI reviver to give cover _AI_dismount = 0; //array no. 58 - toggles ability of reviving AI units to dismount vehicles (1 = dismount) _call_for_AI_help = 1; //array no. 59 - allows AI units to call for help _goto_revive_distance = 500; //array no. 33 - distance AI units will move to revive a downed team mate // ================================================================== // OPTIONS FOR PLAYER'S DEAD BODIES AND EQUIPMENT - Additional revive functions with many thanks to alef (0 - off, 1 - on except for _bury_timeout) _drop_weapons = 1; //array no.93 - should the respawned player drop his weapons where he died? _cadaver = 0; //array no.94 - should the respawned player's body remain there? _bury_timeout = 12; //array no.95 - if drop weapons OR player body, how long before the body is buried? // 0=maximum (1200s) , n=seconds up to 1200s (hard coded) // ================================================================== // USER CODE - eg. NORRNCustonexec1="execvm ""myscript.sqf"";hint ""myoutput"";" NORRNCustomExec1 =""; // Exec1 occurs following being revived NORRNCustomExec2 =""; // Exec2 occurs when you team kill NORRNCustomExec3 =""; // Exec3 occurs when you spawn at base NORRNCustomExec4 =""; // Exec4 occurs when you try and spawn at base but it is still occupied NORRNCustomExec5 =""; // Must use variables: MAP_r_rejoin (false - first time, // true - rejoining the server, and // MAP_r_no_lives - number of lives if you rejoin server) // ===================================================================================================================== // DO NOT MODIFY THE FOLLOWING CODE // ===================================================================================================================== NORRN_revive_array = []; NORRN_revive_array = [_mission_end_function,_all_dead_dialog,_JIP_spawn_dialog,_nearest_teammate_dialog,_unconscious_markers,_follow_cam,_call_out_function,_revive_timer, _heal_yourself,_goto_revive,_unconscious_invincibility,_respawn_at_base_addWeapons,_no_respawn_points,_Base_1,_Base_2,_Base_3,_Base_4,_time_b4_JIP_spawn_dialog, _can_revive,_can_revive_2,_can_be_revived,_can_be_revived_2,_no_enemy_sides,_enemy_side_1,_enemy_side_2,_respawn_button_timer,_distance_to_friend, _revive_time_limit,_respawn_position,_no_of_heals,_lower_bound_heal,_upper_bound_heal,_follow_cam_distance,_goto_revive_distance,_respawn_at_base_magazines, _respawn_at_base_weapons, _Base_free_respawn, _revive_damage, _max_respawns, _unconscious_drag,_AI_smoke,_visible_timer,_allied_side_1,_allied_side_2,_follow_cam_team, _water_dialog, _unconscious_music, _enemy_units_1, _enemy_units_2, _AI_aware,_AI_cover,_mobile_spawn,_mobile_base_start,_mobile_man,_altUnc_animation,_top_view_height, _all_dead_player,_all_dead_distance,_AI_dismount,_call_for_AI_help,_mobile_type,_load_wounded,_perpetual_server,_JIP_respawns,_caseVAC,_mediVAC,_chance_ofDeath,_dualTimer, _respawnAtBaseWait,_objectiveBasedRP,_mobile_base2_start,_mobile_man2,_can_revive_3,_can_revive_4,_can_be_revived_3,_can_be_revived_4,_medic_1,_medic_2,_medic_3,_medic_4, _medpacks,_stabilisation,_bleeding,_medic_medpacks,_unit_medpacks,_medic_bandages,_unit_bandages,_stabTime_tillDeath,_enemy_side_3,_enemy_side_4, _allied_side_3,_allied_side_4,_deadSpectator_cam,_drop_weapons,_cadaver,_bury_timeout,_reward_function,_revives_required,_team_kill_function,_no_team_kills,_medic_stable, _unit_stable, _ACE_mod]; // start related revive functions [] execVM "revive_sqf\init_related_scripts.sqf"; if (true) exitWith {}; //Last edited 17/08/09 //if (_name == player) then {[_name] execVM 'revive_sqf\rPrn.sqf'}
  9. I must be doing something wrong. 1. I have a folder in my mission folder named \scripts with the billowing.sqf in it. the sqf reads: SD_smokePot = "Misc_TyreHeapEP1" createVehicle (getMarkerPos "smokepoint"); [sD_smokePot, [0.1,0.1,0.1]] spawn { _sh=_this select 0; _col=_this select 1; _c1=_col select 0; _c2=_col select 1; _c3=_col select 2; sleep (3+random 1); _source = "#particlesource" createVehicleLocal getpos _sh; _source setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", "Billboard", 1, 20, [0, 0, 0], [0.2, 0.1, 0.1], 0, 1.277, 1, 0.025, [0.1, 2, 6], [[_c1, _c2, _c3, 0.2], [_c1, _c2, _c3, 0.05], [_c1, _c2, _c3, 0]], [1.5,0.5], 1, 0.04, "", "", _sh]; _source setParticleRandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10]; _source setDropInterval 0.03; _source2 = "#particlesource" createVehicleLocal getpos _sh; _source2 setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 8, 0], "", "Billboard", 1, 20, [0, 0, 0], [0.2, 0.1, 0.1], 0, 1.277, 1, 0.025, [0.1, 2, 6], [[_c1, _c2, _c3, 1], [_c1, _c2, _c3, 0.5], [_c1, _c2, _c3, 0]], [0.2], 1, 0.04, "", "", _sh]; _source2 setParticleRandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.2], 0, 0, 360]; _source2 setDropInterval 0.03; }; 2. I created a marker in editor named "smokepoint" what else is needed because there is no tire pile or smoke... should ther not be a execVM someplace? ---------- Post added at 11:34 AM ---------- Previous post was at 11:29 AM ---------- I added execVM "scripts\billowing.sqf"; to my init.sqf and woot we have smoke. Thanks
  10. Sorry for asking agian. I still do not have this right yet. I am still having trouble getting it to work. I have the script folder and sqf file done in the mission file. What is not clear is what to do with SD_smokePot = "Misc_TyreHeapEP1" createVehicle (getMarkerPos "smokepoint"); what is the marker for? Do i put what where? If I have a tyre heap on the ground named "tire1" do I add this to the init? SD_smokePot = "Misc_TyreHeapEP1" createVehicle (getMarkerPos "smokepoint"); or does this go into a trigger and then what is the activation.....? I just do not understand what goes in what because there are different people saying different things here and I am now confused because we have added a "marker" as well.
  11. Norrin has a great script wrote for extractions and insertions. Very nice. Only thing is the wait times before some actions can be made. I need to understand the "sleep" function in his scripts. I see sleep times ranging from 0.1 to 20. Is this 1 sec for each 0.1 ? Reason I ask is I need to change some times to be shorter. Here is his script... http://forums.bistudio.com/showthread.php?p=1750900#post1750900 What I need to know is how to shorten the time between: 1. when the chopper lands and when the player gets the hint to "Board the chopper" 2. when the player gives the "All clear for take off" command and when the bird actually lifts off. Any help would be awesome.
  12. I am very new to this scripting but learning fast. Please, can you be more "Newb" friendly in the language used here..lol I have made a sqf file named billowing.sqf, and pasted this code below in it. SD_smokePot = "Misc_TyreHeapEP1" createVehicle (getMarkerPos "smokepoint"); [sD_smokePot, [0.1,0.1,0.1]] spawn { _sh=_this select 0; _col=_this select 1; _c1=_col select 0; _c2=_col select 1; _c3=_col select 2; sleep (3+random 1); _source = "#particlesource" createVehicleLocal getpos _sh; _source setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", "Billboard", 1, 20, [0, 0, 0], [0.2, 0.1, 0.1], 0, 1.277, 1, 0.025, [0.1, 2, 6], [[_c1, _c2, _c3, 0.2], [_c1, _c2, _c3, 0.05], [_c1, _c2, _c3, 0]], [1.5,0.5], 1, 0.04, "", "", _sh]; _source setParticleRandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10]; _source setDropInterval 0.03; _source2 = "#particlesource" createVehicleLocal getpos _sh; _source2 setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 8, 0], "", "Billboard", 1, 20, [0, 0, 0], [0.2, 0.1, 0.1], 0, 1.277, 1, 0.025, [0.1, 2, 6], [[_c1, _c2, _c3, 1], [_c1, _c2, _c3, 0.5], [_c1, _c2, _c3, 0]], [0.2], 1, 0.04, "", "", _sh]; _source2 setParticleRandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.2], 0, 0, 360]; _source2 setDropInterval 0.03; }; Now, what do I do next? I have this code that I think goes into the init.sqf file: _handle = []execVM "scripts\billowing.sqf"; then i change the _handle to what ever name I want and then name the object(in this case a tire heap) to be "smoking" the new name. not sure here...
  13. Very nice script, this will allow me to clean up a couple of missions where I have 3 or 4 extractions set up with preset waypoints. Not to mention I can extract anywhere now instead of moving to a pre determined LZ. One question. How can I shorten the time the bird is on the LZ. If that LZ is Hot we die before we get airborne again. When the bird lands on the LZ, you have to wait for 25 to 30 seconds, even longer before you get the hint "Board the Chopper". If you board before that it will not read right and bug out. After you get the hint "Board the Chopper" message and get in bird, you get the hint "Give Chopper all clear for takeoff". Once you give the command to takeoff, you then have to wait another 30 seconds or so before chopper lifts off. Once in the air, it takes a second or so then you get the hint to go back to base or set new destination. Times are not too bad here but still could be shorter for a hot lz Those two 30 second waits are death on a hot LZ. Is there a way I can shorten those times? I see "sleep 5" and "sleep 0.1" ect in some files. What is the actual times for the "sleep"? can I just go in to each file and change any "sleep" greater than 0.5 and make them 0.5 or less? Other than those two times I really like this script and will be using it regularly with your credits in tact, thank you for your time put in this.
  14. McSpuds

    enemy artillery ?

    He will kill himself, the AI does not recognize "Danger Close"... lol
  15. McSpuds

    Revive Script

    I have searched till my eyes hurt. And can not find a way to search just this thread and it's 65 pages long.... I hope somebody can help me. After setting up Revive, I tried to load the mission in editor several times and my game crashes with the following error code: missio\revive.sqf\dialogs\config.ccp, line 75: .Cfgsounds: Member already defined. I have turned off Mondo Missile as another thread tried that. But that did not help.
  16. I am new to all this, please explain "your_sl_init_string_here" nul = [this,trigger1,"once",1,1,"your_sl_init_string_here"] execVM "murk_spawn.sqf"; What do I place there? ---------- Post added at 09:36 AM ---------- Previous post was at 08:20 AM ---------- I tried this by renaming unit "u1", and the units did not despawn at start nul = [this,trigger1,"once",1,1,"u1 setPos ((position this nearestObject 8389) buildingPos 8)"] execVM "murk_spawn.sqf"; ---------- Post added at 10:19 AM ---------- Previous post was at 09:36 AM ---------- I have this working for the moment, thanks Murklor, this is a great script. nul = [this,trigger1,"once",1,1,"u1 setPos ((position this nearestObject 8389) buildingPos 8)"] execVM "murk_spawn.sqf"; this disableai "MOVE"; The units spawn at start then despawn correctly. On trigger they spawn on location and stay put..... awesome!
  17. This is my first how to, and I hope it helps in editing. It took a lot of searching and reading to find all the pieces to get my extraction to work. Once I got it working, I wanted to share it with others who might be looking for the same thing. I know how frustrating it can be to get things to work if you are new to editing. Anyway, here it is..... ************************************************************************* This is a very easy way to set up a helicopter extraction if you know the location that you will be extracting from. I use this in missions where I will set up two or three pre-plotted extraction points for the players to use. What it does is allows you to call in a Dustoff to a predetermined location using the radio commands. The helo will come into the lz area and land. Once on the ground the helo will NOT take off till you send another radio message. The helo will then lift off and extract team. Once at a base, the helo will land and shut off engines. This can be used to insert respawned players as well by simply boarding the helo before requesting the dustoff at the LZ. The helo will then, take off and insert team to the LZ. At the bottom is a download that has the mission files and a example MPmission. ************************************************************************ Steps: 1. Create a H landing pad and name it "LZ_Base1" 2. Create a empty helicopter and name it "helo1" 3. Create a pilot and name them "pilot1" (you can create a co-pilot as well, just be sure to group it to the pilot) 4. Create a trigger with Axis: 0 x 0, Activation: Radio Alpha, Repeatedly, Type: Switch (this deletes the wp it will be sync'd to), Text: LZ_Base1, on Act: hint "Dustoff for LZ Alpha requested"; 5. Set the following waypoints for the pilot: WP1: Hold (place near helo1) WP2: GET IN NEAREST effects: Text in text block type "Dustoff for LZ Alpha in route" (place on top of helo1) WP3: MOVE set speed:Full On Act: helo1 flyInHeight 25; (place close to helo1 in the line of departure) Set more way points to get to LZ. (we will place wp on LZ Alpha later) 6. Back at pilot location, sync trigger with the Hold Waypoint. 7. Create Landing Zone for helo1 at desired location. Name it "LZ_Alpha" (I use H (invisible)) 8. Last way point before landing needs to have speed set to "LIMITED" and the Behavior set to "CARELESS" (This slows helo down, and looks more realistic because it does not make that high climb right on top of the LZ as the AI pilot raises the nose to slow the bird before landing) (The careless prevents the helo from not landing because of enemy fire, GREAT FOR HOT LZ's) 9. Using the pilot, make a way point and place it on the new LZ set the type to LOAD, On Act: helo1 land "LZ_Alpha"; 10. Right next to the LOAD Way point, make a way point and use the type HOLD 11. Create a trigger named "Dustoff" with Axis 0x0, activation: Radio Juliet, Repeatedly, Type: Switch(this deletes the hold wp it will be sync'd to, thus making the helo lift off), Text: LZ_Alpha, on Act: hint "Lifting off now!"; (You can use this very same trigger if you have several LZ's, just sync each hold wp to this trigger) (The o,o,o radio command will tell the pilot to "Take Off". This eliminates the need for all that complicated scripting to tell the bird when everybody is on board) 12. Syc the trigger to the last HOLD way point. 13. After the Hold WP, now set WP's back to LZ_Base to land. 14. The first wp after the LZ should be set to speed: FULL and in on Act: helo1 flyInHeight 25; 15. Once again right before landing set the last WP to a speed of LIMITED. 16. The last way point is set to Type: Unload, On Act: dostop helo1; helo1 land "LZ_Base"; Here is the neat part, this whole thing can be cycled! If you set a respawn marker near the LZ_Base, you can add a couple more way points and use the same bird to insert you back onto LZ Alpha. 17. To set helo1 to repeat in a loop create next WP and set type: GET OUT , place on LZ Base 18. Make a WP set type: GET IN NEAREST, Place on LZ Base near helo. 19 Make a WP set type:CYCLE , important part, Place this WP right on top of the trigger near the pilot that request LZ Alpha Dustoff. It is the HOLD WP that has the first trigger syc'd to it. I hope this little set up helps somebody. In the example download there is also a trigger and game logic to set a smoke on the LZ automaticly. Helo_extraction Example Download If you will, please come to www.black-company.org and let me know if this helped you any.
  18. Great script! I know I wont get a answer from Murklor but maybe somebody has a idea. I am trying to get a squad to spawn using the murk_spawn.sqf. I want them to spawn in certain building positions and stay in that position. IE... on a balcony or rooftop. I have the building ID and position numbers, and using this code in the init of the individual soldiers: this setPos ((position this nearestObject 8389) buildingPos 8); this disableai "MOVE"; the code for the sqd ldr is nul = [this,trigger1,"once"] execVM "murk_spawn.sqf"; The spawn is working great till I place a couple of soldiers in a building with the setPos command. This causes the spawns to double! I get two soldiers at the position instead of one, and one stays the other moves away... Any fix?
  19. Squad name - The Black Company Timezone/location - EST New York Squad gamemode preference (eg coop or pvp) - COOP/CTF Contact email - [email protected] Website address - http://www.black-company.org/index.php
  20. McSpuds

    The Black Company

    We now have added a server at AOWC. Set filter to [TBC] and it will pop up. 75.102.38.52:2302 Come by and join us.
  21. McSpuds

    enemy artillery ?

    I still can not get these scripts to work by themselves. The mortar script and the FO script. When I use both, it works wonderfully. But separate them and nothing works. Here is what I have to get it to work. I need to see if I can get the script to work with the D30 instead because it has dedicated smoke rounds... 1. I create 3 Podnos mortars grouped. in int I place: this addMagazine "ARTY_8Rnd_82mmHE_2B14"; 2.. I create a Module named RU_mortar 3. I sync Module with mortar leader 4. I create the trigger, 3000x3000 to cover area and set to activate BLUFOR detect by OPFOR, REPEAT on act: firemission = ["IMMEDIATE","HE",0,8]; nul=[getPosASL (thisList select 0)] execVM "mortar.sqf"; 5. I create FO and in int I add: crap = [this, RU_mortar, 1, west] execVM "fo\forward_observer.sqf"; I have the following sqf file in the mission folder named "mortar" #define __debug false private "_mortarTgtPos"; _mortarTgtPos = _this select 0; if (__debug) then { player sideChat "Executing mortar.sqf" }; if ([iNS_mortar, _mortarTgtPos, fireMission select 1] call BIS_ARTY_F_PosInRange) then { [iNS_mortar, 200] call BIS_ARTY_F_SetDispersion; [iNS_mortar, _mortarTgtPos, fireMission] spawn BIS_ARTY_F_ExecuteTemplateMission; //hint "mortars: Firing."; //_mrk = createMarker ["MortarTarget", _mortarTgtPos]; //_mrk setMarkerColor "ColorBlack"; //_mrk setMarkerShape "ICON"; //_mrk setMarkerType "mil_objective"; waitUntil {INS_mortar getVariable "ARTY_ONMISSION"}; if (__debug) then { player sideChat "mortars are on a mission" }; if (__debug) then { player sideChat format["ammo used: %1", INS_mortar getVariable "ARTY_AMMO"] }; waitUntil {INS_mortar getVariable "ARTY_COMPLETE"}; if (__debug) then { player sideChat "mortars have finished fire mission" }; waitUntil {INS_mortar getVariable "ARTY_SPLASH"}; if (__debug) then { player sideChat "mortars about to splash!" }; sleep 10; //deleteMarker _mrk; } else { //hint "mortars: Target out of range"; }; if (__debug) then { player sideChat "Exiting mortar.sqf" }; In a folder named "FO" I have two sqf files, one named forward_observer: sleep 5; // This needs to be figured out better, probably needs to watch the arty modules and see when they are done with init. _fo = _this select 0; _battery = _this select 1; _wait = _this select 2; //this is in minutes, min 2 minutes; _side = _this select 3; _isAssigned = _fo getVariable "FO_Assigned"; _forceMultiplier = 1; _lastMission = [-10000,-10000,0]; if (_wait < 0.5) then { _wait = 0.5; }; if (isNil "_isAssigned") then { _fo setVariable ["FO_Assigned", 1, true]; while {(alive _fo and [_battery] call BIS_ARTY_F_StillViable)} do { _mostCount = 0; _target = null; _units = nearestObjects [_fo, ["LandVehicle", "CAManBase"], 500]; //player sideChat "Looking for targets..."; { if (side _x == _side and alive _x) then { //player sideChat "Found..."; _liveCount = 0; _objects = []; _near = nearestObjects [_x, ["LandVehicle", "CAManBase"], 100]; _liveCount = 0; _objects = []; { if(side _x == _side and alive _x and (damage _x) < 0.5) then { _liveCount = _liveCount + 1; _objects = _objects + [_x]; }; } forEach _near; if(_liveCount > _mostCount and (_x distance _lastMission) > 120) then { _forceMultiplier = 1; //player sideChat format["Distance from last mission: %1", (_x distance _lastMission)]; _tanks = "Tank" countType _objects; _forceMultiplier = _forceMultiplier + (_tanks * 0.33); _apcs = "Wheeled_APC" countType _objects; _forceMultiplier = _forceMultiplier + (_apcs * 0.25); _mostCount = _liveCount; _lastMission = getPos _x; if((leader _x) != _x and ((leader _x) distance _x) <= 100) then { _target = leader _x; } else { _target = _x; }; }; //player sideChat format["Objects near %1: %2", _x, (count _near)]; sleep 0.025; } } forEach _units; if( isNil "_target") then { _lastMission = [-10000,-10000,0]; //player sideChat "No targets found near the FO"; } else { //player sideChat format["Target is: %1 counting for %2 units total.", _target, _mostCount]; //player sideChat format["Executing fire mission on %1", _target]; _fo setVariable ["FO_MissionComplete", false, true]; crap = [_battery, _target, _mostCount, _fo, _forceMultiplier] execVM "fo\engage.sqf"; //player sideChat "Waiting for FO to finish mission"; waitUntil { _fo getVariable "FO_MissionComplete"; }; //player sideChat "FO has finished mission"; }; //player sideChat format["Waiting %1 minutes till next search.", _wait]; sleep (round (_wait*60)); } } else { //player sideChat "FO is already searching for targets"; }; //player sideChat format["FO %1 is no longer operating!", _fo]; and a file named engage: _battery = _this select 0; _target = _this select 1; _targetCount = _this select 2; _fo = _this select 3; _fm = _this select 4; _pieces = count (units (_battery getVariable "ARTY_LEAD")); _rounds = (ceil ((ceil (_targetCount/2) max 2)*_fm))*_pieces; _rounds = _rounds min (_pieces*8); if(_rounds > 2) then { _rounds = (_rounds + (_rounds % 2)); }; _mission = ["IMMEDIATE", "HE", 0, _rounds]; if(_rounds > 2 and ((ceil (random 9) > 6))) then { // Do adjust fire mission! // Number of adjustments to do. _adjustments = (ceil (random 2) max 1); //player sideChat format["Firing %1 adjustment rounds", _adjustments]; while {_adjustments > 0} do { _adjustX = ((round (random 50)) + (_adjustments*75)); _adjustY = ((round (random 50)) + (_adjustments*75)); if( round (random 1) == 0) then { _adjustY = _adjustY*-1; }; if( round (random 1) == 0) then { _adjustX = _adjustX*-1; }; _targetPos = getPosASL _target; _adjustPoint = [((_targetPos select 0) + _adjustX), ((_targetPos select 1) + _adjustY), _targetPos select 2]; //player sideChat format["Firing adjustment at: %1", _adjustPoint]; [_battery, _adjustPoint, ["IMMEDIATE", "WP", 0, 1]] call BIS_ARTY_F_ExecuteTemplateMission; waitUntil {_battery getVariable "ARTY_ONMISSION"}; //player sideChat "Adjust mission started"; waitUntil {!(_battery getVariable "ARTY_ONMISSION")}; //player sideChat "Adjust mission ended"; waitUntil {_battery getVariable "ARTY_SPLASH"}; //player sideChat "adjust splash"; sleep 15; _adjustments = _adjustments - 1; }; //player sideChat "Adjustments complete, firing for effect!"; }; //player sideChat format["%1: firing for effect %2 rounds", _battery, _rounds]; [_battery, ((round (_rounds*12.5)) min 200)] call BIS_ARTY_F_SetDispersion; [_battery, (getPosASL _target), ["IMMEDIATE", "HE", 0, _rounds]] call BIS_ARTY_F_ExecuteTemplateMission; waitUntil {_battery getVariable "ARTY_ONMISSION"}; //player sideChat format["%1: FFE mission started", _battery]; waitUntil {!(_battery getVariable "ARTY_ONMISSION")}; //player sideChat format["%1: FFE mission ended", _battery]; waitUntil {_battery getVariable "ARTY_SPLASH"}; //player sideChat format["%1: FFE splash", _battery]; sleep 10; _fo setVariable ["FO_MissionComplete", true, true];
  22. McSpuds

    enemy artillery ?

    Ashram, could I ask a favor of you? I need to do two things with the script. I can not get it right. I need the chat to stop. I tried to delete the player chat but it stops working. I also need to see if I can get the mortars to fire smoke. Is this possible.
  23. McSpuds

    enemy artillery ?

    Ashram, Great Script!!! Nouber Nou, The FO script compliments this script wonderfully! Great job to you as well... My hat goes off to ya both. I am new to editing and mission making and your simple way of showing things along with providing examples was very clear for me to understand. and believe me, I have a hard time understanding most of the scripting. Although I am learning fast with the help of folks like you two. I now have a very nice arty option for missions if I need it. Keep up the good work. Hey CaptainBravo! They do work together! ---------- Post added at 12:40 AM ---------- Previous post was Yesterday at 11:49 PM ---------- Ashram, I am getting the following error when I try to add ammo.. No entry 'bil\config.bin/CfgMagazines.2b14_82mm'. Any suggestion?
  24. OK here is how I got it to work as a IED. Make a trigger: axis:8x8 activation: anything but a civilian present once name:trig1 Condition: on act: Create a civilian car Name: car1 initialization: when whoever you have set in the trigger to activate gets within 8 meters, "Kaboom!"
  25. I have been searching these threads for a solution to my problem and thought maybe in the Mod section somebody might have a answer. I have steam version of ARMA Combined Operations. Problem is that when running OA it will recognize A2 but no Mods. How do I install these mods to where OA will recognize them?
×