McSpuds
Member-
Content Count
29 -
Joined
-
Last visited
-
Medals
Community Reputation
10 GoodAbout McSpuds
-
Rank
Private First Class
-
Need to add altimeter to HALO jump
McSpuds posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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 ""; -
Editor based AI spawn script by trigger
McSpuds replied to Murklor's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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. -
Editor based AI spawn script by trigger
McSpuds replied to Murklor's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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. -
Need AI pilot to eject
McSpuds replied to McSpuds's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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.. -
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.
-
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; };
-
Editor based AI spawn script by trigger
McSpuds replied to Murklor's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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? -
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 (simonnsl@iprimus.com.au) 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'}
-
Billowing smoke, permanent
McSpuds replied to scajolly's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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 -
Billowing smoke, permanent
McSpuds replied to scajolly's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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. -
Billowing smoke, permanent
McSpuds replied to scajolly's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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... -
Sleep Function (wait time) in script
McSpuds posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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. -
Chopper/aerial taxi script
McSpuds replied to norrin's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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. -
enemy artillery ?
McSpuds replied to CaptainBravo's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
He will kill himself, the AI does not recognize "Danger Close"... lol -
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.