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

hogmason

Member
  • Content Count

    405
  • Joined

  • Last visited

  • Medals

Everything posted by hogmason

  1. place this in your init.sqf player setVariable ["BIS_noCoreConversations", true]; found in the MSO civilian files so must work. ---------- Post added at 20:37 ---------- Previous post was at 20:37 ---------- danm cuel lol u beat me by 5 secounds
  2. ok so i am trying to make some code run if the speed of a player within 5mtrs of an object is above a set speed something like this i tried but diddnt work _iedpos = _this select 0;// comes from a calling script _spd = [0.5,0.8,1] call BIS_fnc_selectRandom; _distance = _distance = [3,5,6,8,10] call BIS_fnc_selectRandom; // before i go on the ESCORT_Units in the below if command is an of unit names found in my common.sqf if (({(_x distance _iedpos) <_distance} count ESCORT_Units) > 0 && speed > _spd) then { // now my detonation script goes in here };
  3. thanks for the replies guys got it working with this if (({(_x distance _iedpos) <_distance && (speed _x) >2} count Player_Units) > 0) exitwith ---------- Post added at 20:32 ---------- Previous post was at 20:30 ---------- iceman that extra _distance is a copy and past error ;) just in case any 1 needs it in the future this is the full code how i got it working waituntil {!isnil "bis_fnc_init"}; _iedpos = _this select 0; while {true} do { _wait = [0.2,1,2,4] call BIS_fnc_selectRandom; _distance = [3,5,6,8,10] call BIS_fnc_selectRandom; if (({(_x distance _iedpos) <_distance && (speed _x) >2} count Player_Units) > 0) exitwith { hint "FUCK IED RUN";// CHANGE TO PLAY A SOUND sleep _wait; _bombtype = ["Sh_105_HE","BO_GBU12_LGB"] call BIS_fnc_selectRandom; _bomb = _bombtype createVehicle position _iedpos; deletevehicle _iedpos; }; if (HOG_debug) then { [player,nil,rsideChat,"IED detonate LOOP."] call RE; }; sleep 1; };
  4. You know whats got me is how you could like make a spaceing on each position result so the results dont land next to another result i.e a 50 mtr gap at minimum between results.
  5. most likely the best way is to use shk pos http://www.armaholic.com/page.php?id=13783 download it follow instructions to fire it up in the mission and use this to call it in your script _pos = getpos player; _spos = [_pos,random 360,[1000,2000]] call SHK_pos;// 1000 = minimum 1000mtrs change as needed and 2000 = max distance change as needed
  6. the easiest way is _target = player // change this to the object name that you want to get the position around _dist = random 45;// this chooses a random distance from 0-45 _dir = random 360;// this selects a random direction from 360 degrees rotation _pos = getPos _target; _positions = [(_pos select 0) + (sin _dir) * _dist, (_pos select 1) + (cos _dir) * _dist, 0]; //then to use you use i.e _mkr = createMarker ["test", _positions]; // or _ied = "Land_IED_v4_PMC" createVehicle _positions ; //so the _positions becomes the positions
  7. thanks ice i changed it to this [color="#FF0000"]pilots = [s13,s14];// names of the units on the map if (name player in pilots) then {[/color] private "_v"; while {alive player} do { waituntil {vehicle player != player}; _v = vehicle player; if (_v iskindof "Helicopter" && !(_v iskindof "ParachuteBase")) then { if (driver _v == player) then { player action ["eject",_v]; waituntil {vehicle player == player}; hint "We shall leave the piloting to those with the appropriate training."; }; }; }; }; but doesnt work :( ---------- Post added at 16:32 ---------- Previous post was at 16:32 ---------- yeah sorry my fault pilots is an array of unit names in the editor its found in my common.sqf
  8. this doesnt work at all // called by _null = [] execVM "HOG_scripts\vehiclelock.sqf"; _vehicle = _this select 0; // i added this line. _vehicle addEventHandler ["GetIn", { //private ["_veh", "_pos", "_unit"]; _veh = _this select 0; _unit = _this select 1; if (!(name _unit in pilots) && isPlayer _unit) then { _unit action ["Eject", vehicle _unit]; hint "Only Pilots are qualified to fly"; }; }];
  9. how can we change this to only pilot seat so all players can get in passanger and gunner seats but not pilots seat
  10. ok so i have this code been working on it today ive come to the point where my skills have come to a hault so wondering if some one could fix / finish this for me its only 2 little steps to do. the code is needed to check to see if any of the EOD vehicles form the EOD_vehicles array are within 50mtrs of an object with the classname from ieds array. i have colored the parts im stuck with in red and also used // then comments to let you know what i am trying to do. intellRecieved = 0; while {true} do { EOD_vehicles = [EOD_vehicle_1, EOD_vehicle_2]; // this is an array of the vehicle names ieds = ["Land_IED_v1_PMC","Land_IED_v2_PMC","Land_IED_v3_PMC","Land_IED_v4_PMC"]; // this is an array of the ieds classnames if (([color="#FF0000"]EOD_vehicles distance ieds <50[/color]) then { if (intellRecieved ==0) then { intellRecieved = 1; _dist = random 50; _dir = random 360; [color="#FF0000"]_pos = ;// i dont know about this one need it to be the selected ieds result.[/color] _positions = [(_pos select 0) + (sin _dir) * _dist, (_pos select 1) + (cos _dir) * _dist, 0]; hint "IED Detected"; mkr = createMarkerLocal [format ["mrk%1",random 100000], _positions]; _mkr setMarkerTypeLocal "mil_Dot"; _mkr setMarkerTextLocal "ied Approx"; _MKR setMarkerColorLocal "ColorRed"; sleep 30; deleteMarker _mkr; intellRecieved = 0; }; }; sleep 3; }; thanks in advance.
  11. ok cheers for the push in the right direction mate. So i tried this but i get an error now the EOD_vehicle_1 is the vehicles name not an array name. if (nearestObjects [EOD_vehicle_1, ["Land_IED_v1_PMC","Land_IED_v2_PMC","Land_IED_v3_PMC","Land_IED_v4_PMC"], 50]) then { }; the error if (nearestObjects [EOD_vehicle_1, ["Lan> Error position: <if (nearestObjects [EOD_vehicle_1, ["Lan> Error if: Type Array, expected Bool ---------- Post added at 09:49 ---------- Previous post was at 09:49 ---------- yeah i also ended up going the spawn command as well thanks for that i never thought about it. ---------- Post added at 10:14 ---------- Previous post was at 09:49 ---------- so i am not getting any errors with this but nothing happens either eod.init while {true} do { _ieddetect = nearestObjects [EOD_vehicle_1, ["Land_IED_v1_PMC","Land_IED_v2_PMC","Land_IED_v3_PMC","Land_IED_v4_PMC"], 50]; { if({isPlayer _x} count crew _x > 0) then { [] spawn EOD_veh_1_DETECT; }; } foreach _ieddetect; sleep 1; }; EOD_veh_1_DETECT if (intellRecieved ==0) then { intellRecieved = 1; publicVariable "intellRecieved"; _dist = random 50; _dir = random 360; _pos = getPos EOD_vehicle_1; _positions = [(_pos select 0) + (sin _dir) * _dist, (_pos select 1) + (cos _dir) * _dist, 0]; hint "Possible IED Detected"; mkr = createMarkerLocal [format ["mrk%1",random 100000], _positions]; _mkr setMarkerTypeLocal "mil_Dot"; _mkr setMarkerTextLocal "Possible IED Detected"; _MKR setMarkerColorLocal "ColorRed"; sleep 60; deleteMarker _mkr; intellRecieved = 0; publicVariable "intellRecieved"; } else { if (HOG_debug) then { [player,nil,rsideChat,"Already have IED intell."] call RE; }; };
  12. hogmason

    Multiple side respawn

    ok so use norrins revive system it was really easy just had to make an array of each side and ta da i.e USman = ["US_Soldier_EP1"]; // fill this array up with US man classnames that you will be using, BAFman = ["BAF_Soldier_MTP"]; // fill this array up with BAF man classnames that you will be using, if (typeof player in USman) then {server execVM "US_revive.sqf"}; if (typeof player in BAFman) then {server execVM "BAF_revive.sqf"}; any way here is a working demo http://www.giggledesigns.net/HOG_scripts/2_team_revive.Desert_E.rar
  13. hogmason

    Multiple side respawn

    you can use norrins revive, with some major tweaking ill have a look today
  14. hogmason

    HOG Mechanic v2.0

    UPDATE. *fixed a missing error 30/11/2012 PLEASE REDOWNLOAD THE FILE
  15. hogmason

    HOG MHQ v1.0

    Thanks for pointing that out EZJack ive corrected the issue i accidently uploaded the wrong rar file ;) alls working fine now mate.
  16. hogmason

    HOG Mechanic v2.0

    HOG Mechanic v2 By =Mason= ///////////////////////////////// ======================>>>>DOWNLOAD<<<<<======================= ============= ABOUT ============= This script gives the player the ability to repair vehicles if a few requirments are met. ================= HOW THIS WORKS ================= At base there is a pile of tyres and fuel cans from each pile an engineer can pickup a spare tyre for Vehicle Repairs or a Fuel can to refuel a Vehicle. To check how many tyres you have or fuel cans you have open your map and you will find a radio with 2 options 1 to check spare tyres and 1 to check Fuel cans. ============= Requirments ============= 1) player is an engineer. 2) player has at least 1 spare tyre to repair a vehicle. 3) player at least 1 fuel can to refuel a vehicle. ============= HOW TO USE ============= 1) drag the demo to your missions folder C:\Users\yourname\Documents\ArmA 2 Other Profiles\yournick\missions 2) then open it in the editor to view what you need on the map for the script to run you can simpy select merger in the editor to merge all objects on the map over to your mission. 3) transfer the HOG_scripts folder over to your mission folder and place the following in your init.sqf // HOG_mechanic start and Public Variable if ! isdedicated then { [player] execVM "HOG_scripts\HOG_mechanic\common.sqf"; //Repair [player] execVM "HOG_scripts\HOG_mechanic\Repair\add_repair_TOvehicle.sqf"; [player] execVM "HOG_scripts\HOG_mechanic\repair_functions.sqf"; [player] execVM "HOG_scripts\HOG_mechanic\Repair\tyre_count.sqf"; //Refuel [player] execVM "HOG_scripts\HOG_mechanic\Refuel\add_refuel_TOvehicle.sqf"; [player] execVM "HOG_scripts\HOG_mechanic\refuel_functions.sqf"; [player] execVM "HOG_scripts\HOG_mechanic\Refuel\fuelcan_count.sqf"; }; =================================================== SETTING UP LIST OF ENGINEERS / USING WITH UNIT MODS =================================================== TO add different engineer classnames simply open up HOG_scripts\HOG_mechanic\common.sqf and at the top you will find crewType = ["USMC_SoldierS_Engineer","US_Soldier_Engineer_EP1","BAF_Soldier_EN_W","BAF_Soldier_EN_DDPM", "BAF_Soldier_EN_MTP","Soldier_Engineer_PMC","CDF_Soldier_Engineer"]; now this has all standalone engineer classnames but if you need more just add them in to the _crewType array. =================== UPDATES =================== V2 * Changed from player needing a laserdesignator to use repair and refuel to player needing a spare tyre to repair and a Fuel can to refuel. * Fixed a variable issue * Sepperated Repair and Refuel to 2 seperate events. =================== COPYRIGHT STATEMENT =================== HOG Mechanic is © 2012 All rights reserved. ================ LEGAL DISCLAIMER ================ The Software is distributed without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. The Software is not an official addon or tool. Use of the Software (in whole or in part) is entirely at your own risk. ========================================================= DISTRIBUTING SIMULATION CONTENT CREATED WITH THE SOFTWARE ========================================================= Please note that you do NOT require permission from The Contributors to distribute simulation content (e.g. missions) created with the Software. However, The Contributors do ask that you credit the Software in any release documentation. ======= CREDITS ======= thanks to the community on BIS Forums for helping me to get my knowledge of Arma 2 scripting.
  17. how can i use an array inside an addaction i.e [color="#FF0000"]_crewType = ['USMC_SoldierS_Engineer','US_Soldier_Engineer_EP1','BAF_Soldier_EN_W','BAF_Soldier_EN_DDPM', 'BAF_Soldier_EN_MTP','Soldier_Engineer_PMC','CDF_Soldier_Engineer'];[/color] _id = _x addAction ["Repair Vehicle", "HOG_scripts\HOG_mechanic\repair.sqf", [], 1, false, true, "", "(getDammage _target) < 1 AND (getDammage _target) > 0 AND [color="#FF0000"](typeof _this) == _crewtype[/color] AND (vehicle _this) == _this"]; the reason is i need only the unit classnames inside the array to be able to recieve the addaction
  18. how can i change this line from a faction to a classname of a unit _id = _x addAction ["Repair Vehicle", "HOG_scripts\Vehicle_Repair\vehicleRepair.sqf", [], 1, false, true, "", "(getDammage _target) < 1 AND (getDammage _target) > 0 AND [color="#FF0000"](faction _this) == 'BIS_US' [/color]AND (vehicle _this) == _this"];
  19. yeah i ended using side then later on in the script adding a classname chack
  20. hogmason

    HOG Mechanic v2.0

    thanks foxhound much appreciated mate. ;)
  21. thanks mate that done the trick just had to change it to if (typeof player in _crewType) then
  22. why is this not working _crewType = ["USMC_SoldierS_Engineer","US_Soldier_Engineer_EP1","BAF_Soldier_EN_W","BAF_Soldier_EN_DDPM", "BAF_Soldier_EN_MTP","Soldier_Engineer_PMC","CDF_Soldier_Engineer"]; if (typeof player != _crewType) then { //my code in here }; this is the rpt error Error position: <!= _crewType) then { _id = _x addActio> Error !=: Type Array, expected Number,String,Object,Side,Group,Text,Config entry,Display (dialog),Control,Team member,Task,Location
  23. ok so now i need to let this script be used by multiple classnames i tried an array but doeasnt work _[color="#FF0000"][/color][color="#FF0000"]units = [uSMC_SoldierS_Engineer, US_Soldier_Engineer_EP1,BAF_Soldier_EN_W, BAF_Soldier_EN_DDPM,BAF_Soldier_EN_MTP,Soldier_Engineer_PMC,CDF_Soldier_Engineer];[/color] _id = _x addAction ["Repair Vehicle", "HOG_scripts\HOG_mechanic\repair.sqf", [], 1, false, true, "", "(getDammage _target) < 1 AND (getDammage _target) > 0 AND [color="#FF0000"](typeOf _this) !== _units [/color]AND (vehicle _this) == _this"]; how can i do this
×