Jump to content

cobra4v320

Member
  • Content Count

    1370
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by cobra4v320

  1. cobra4v320

    hasweapon simple syntax problem

    Another method for any weapon: primaryWeapon player != ""
  2. LMAO, nice Grumpy.
  3. cobra4v320

    AI HALO Jump Example Mission

    Sorry not working on this at all at the moment. The scripting and ideas are there for the community to use.
  4. cobra4v320

    random weapon on table script

    Have you tried addweaponcargoglobal? MP synchronized. ---------- Post added at 20:16 ---------- Previous post was at 20:00 ---------- _randomWeapons1 = ["srifle_EBR_F","arifle_MX_f","arifle_MXM_F","arifle_TRG20_F","arifle_Katiba_F"] call bis_fnc_selectRandom; _randomWeapons2 = ["srifle_EBR_F","arifle_MX_f","arifle_MXM_F","arifle_TRG20_F","arifle_Katiba_F"] call bis_fnc_selectRandom; _holder1 = createVehicle ["groundweaponholder",[getPosATL randSpawn1 select 0, getPosATL randSpawn1 select 1, 0.85], [], 0, "can_Collide"]; _holder2 = createVehicle ["groundweaponholder",[getPosATL randSpawn2 select 0, getPosATL randSpawn2 select 1, 0.85], [], 0, "can_Collide"]; _holder1 addWeaponCargoGlobal [_randomWeapons1, 1]; _holder2 addWeaponCargoGlobal [_randomWeapons2, 1];
  5. I placed a paratrooper with init line this addrating -3000 and the open parachute action is not there. Seems like a bug to me. I went into the debug console and put in player action ["openparachute"] and it worked fine. Adding the action yourself seems like the only workaround. ---------- Post added at 11:13 ---------- Previous post was at 11:01 ---------- if ([url="https://community.bistudio.com/wiki/animationState"]animationState[/url] player == "youranimationhere") then {your code here};
  6. Once you have the objects you want its easy to copy/paste them around the map. Makes it really easy to setup a FOB or camp just about anywhere. Keep in mind that you cannot change the name or the init line in the editor. If you double click on the object then hit okay it will sometime default back to a helicopter or a bunker. You would have to edit the name and init line from the mission.sqm file. Thats been my experience with it anyways.
  7. Awesome thank you, should make things easier.
  8. I wouldn't use a helipad since helicopters prefer landing on them. Instead use an object/mine/chemlight and name it dude. Save the mission. Go under your mission.sqm file and find dude. Delete out the chemlight class name and replace it with the tower class name. Save the file. Go back to your mission and hit load, do not hit save. You will now have a square with a question mark inside of it. You can copy/ paste as many towers as you want to.
  9. Tried your addon looks like you have it all figured out.
  10. cobra4v320

    A-164 wipeout laser

    Download BI Tools if you want to open the .fsm
  11. cobra4v320

    A-164 wipeout laser

    Have you opened up the mission folder for the mission yet? Look under the livefeed.fsm BIS_Laser = "LaserTargetW" createVehicle [0,0,0]; BIS_Laser attachTo [bIS_SPG_02,[0.75,-3.50,0.90]];
  12. cobra4v320

    Extraction Example

    Some of you might find this useful. This will detect whether or not smoke or an IR strobe is nearby then give you its position. At some point I will add flares. If it doesnt detect either it defaults to the players position. It uses Ruebes randomcirclepositions which can be found in the first post. If anybody knows how to do this better or cleaner Im all ears. _signalArray = []; _smoke = position player nearObjects ["SmokeShell", 50]; _strobe = position player nearObjects ["B_IRstrobe", 50]; _signalArray = _signalArray + _smoke; _signalArray = _signalArray + _strobe; private ["_signal","_signalPos"]; if (count _signalArray > 0) then { _signal = _signalArray select 0; _signalPos = position _signal; } else { _signalPos = position player; }; _safePos = []; _range = 35; _maxGrad = 0.1; while {((count _safePos) == 0)} do { _safePos = [ ["position", _signalPos], ["number", 1], ["objDistance", 9], ["range", [0, _range]], ["maxGradient", _maxGrad] ] call RUBE_fnc_randomCirclePositions; _range = _range * 1.25; _maxGrad = _maxGrad + 0.01; }; private "_extractPos"; _extractPos = createVehicle ["Land_HelipadSquare_F", (_safePos select 0), [], 0, "NONE"]; ---------- Post added at 09:32 ---------- Previous post was at 08:30 ---------- Here is the updated script that checks for smoke or an IR strobe. Still have to add in radio transmissions. The first post and example mission have been updated. Any feedback would be appreciated. /* Filename: fn_extraction.sqf - Version 1.1 Author: cobra4v320 Description: * Spawns a helicopter at a designated location. * The helicopter moves to another designated location to pick up soldiers. * Prior to the helicopter touching down it will open both of its doors. When it lifts off it will close its doors. * The helicopter will then move to another designated location and drop off the soldiers. Prior to landing the doors will open. * When the group gets out the doors will close and the helicopter will return to its spawn position to delete the crew, helicopter, and group. Notes: * Requires pre-placed helicopter pads or place the position over a pad that already exists on the map like Camp Rogain or Stratis Airbase Parameter(s): 0: GROUP - group the helicopter will pick up (group) 1: STARTPOS - spawn position - can be string or position (array) 2: ENDPOS - drop off position - can be string or position (array) 3: HEIGHT - (optional) the altitude where the HALO will start from (number) 4: CAPTIVE - (optional) true to set the helicopter and crew captive (boolean) 5: DAMAGE - (optional) true to allow the helicopter and crew to be damaged (boolean) Example(s): [group player, markerPos "spawnMrk", markerPos "dropOffMrk"] spawn COB_fnc_extraction [group player, markerPos "spawnMrk", markerPos "dropOffMrk", 50, TRUE, FALSE] spawn COB_fnc_extraction */ //Parameters private ["_group","_startPos","_endPos","_height","_captive","_damage"]; _group = [_this, 0, grpNull, [grpNull, objNull]] call BIS_fnc_param; _startPos = [_this, 1, [], [[]]] call BIS_fnc_param; _endPos = [_this, 2, [], [[]]] call BIS_fnc_param; _height = [_this, 3, 50, [0]] call BIS_fnc_param; _captive = [_this, 4, false, [false]] call BIS_fnc_param; _damage = [_this, 5, true, [true]] call BIS_fnc_param; //Validate parameter count if ((count _this) < 3) exitWith {"[Extraction] function requires at least (3) parameters!" call BIS_fnc_error; false}; //Validate Parameters if (isNull _group) exitWith {"[Extraction] Group (0) parameter must not be null. Accepted: GROUP or OBJECT" call BIS_fnc_error; false}; if ((typeName _startPos) != (typeName [])) exitWith {"[Extraction] Position (1) should be an Array!" call BIS_fnc_error; false}; if ((count _startPos) < 2) exitWith {"[Extraction] Position (1) should contain at least 2 elements!" call BIS_fnc_error; false}; if ((typeName _endPos) != (typeName [])) exitWith {"[Extraction] Position (2) should be an Array!" call BIS_fnc_error; false}; if ((count _endPos) < 2) exitWith {"[Extraction] Position (2) should contain at least 2 elements!" call BIS_fnc_error; false}; if (_height < 30) exitWith {"[Extraction] height (3) should be at least 30!" call BIS_fnc_error; false}; //Object given instead of group if (typeName _group == "OBJECT") then { if (_group isKindOf "MAN") then { _group = group _group; } else { if (count crew _group < 1) exitWith { "Vehicle given as GROUP has no crew" call BIS_fnc_error; }; if (!isNull group driver _group) then { _group = group driver _group; } else { if (!isNull group gunner _group) then { _group = group gunner _group; } else { _group = group ((crew _group) select 0); }; }; }; }; //check for smoke, strobe, default is player position //TODO: check for flare _signalArray = []; _smoke = position player nearObjects ["SmokeShell", 50]; _strobe = position player nearObjects ["B_IRstrobe", 50]; _signalArray = _signalArray + _smoke; _signalArray = _signalArray + _strobe; private ["_signal","_signalPos"]; if (count _signalArray > 0) then { _signal = _signalArray select 0; _signalPos = position _signal; } else { _signalPos = position player; }; //find safe landing position _safePos = []; _range = 35; _maxGrad = 0.1; while {((count _safePos) == 0)} do { _safePos = [ ["position", _signalPos], ["number", 1], ["objDistance", 9], ["range", [0, _range]], ["maxGradient", _maxGrad] ] call RUBE_fnc_randomCirclePositions; _range = _range * 1.25; _maxGrad = _maxGrad + 0.01; }; //Create the helipad private "_extractPos"; _extractPos = createVehicle ["Land_HelipadEmpty_F", (_safePos select 0), [], 0, "NONE"]; //Create the helicopter based on groups side private "_heliContainer"; switch (side _group) do { case blufor: { _heliContainer = [[_startPos select 0, _startPos select 1, _height], [_startPos, _extractPos] call BIS_fnc_dirTo, "B_Heli_Transport_01_F", blufor] call BIS_fnc_spawnVehicle; }; case opfor: { _heliContainer = [[_startPos select 0, _startPos select 1, _height], [_startPos, _extractPos] call BIS_fnc_dirTo, "O_Heli_Light_02_F", opfor] call BIS_fnc_spawnVehicle; }; case independent: { _heliContainer = [[_startPos select 0, _startPos select 1, _height], [_startPos, _extractPos] call BIS_fnc_dirTo , "I_Heli_light_03_F", independent] call BIS_fnc_spawnVehicle; }; }; private ["_heli","_heliGroup"]; _heli = _heliContainer select 0; _heliGroup = _heliContainer select 2; //height & speed private "_dir"; _dir = direction _heli; _heli setVelocity [sin (_dir) * 50, cos (_dir) * 50, 0]; _heli flyInHeight _height; _heliGroup allowFleeing 0; _heli allowDamage _damage; _heli setCaptive _captive; //turn off collision lights [_heli] spawn { private "_heli"; _heli = _this select 0; while {alive _heli} do { _heli action ["collisionlightOff", _heli]; sleep 0.01; }; }; //Add the waypoints private "_wp1"; _wp1 = [_heliGroup, position _extractPos, "LOAD", "CARELESS", "YELLOW", "FULL", "FILE", 0, ["true", "_heli = vehicle this; _heli land 'GET IN'; {_heli animateDoor [_x,1]} forEach ['door_back_L','door_back_R','door_L','door_R']"], true] call COB_fnc_addWaypoint; waitUntil { {_x in _heli} count (units _group) == {alive _x} count (units _group) }; {_heli animateDoor [_x,0]} forEach ["door_back_L","door_back_R","door_L","door_R"]; _heli lock true; deleteVehicle _extractPos; private "_wp2"; _wp2 = [_heliGroup, _endPos, "UNLOAD", "CARELESS", "YELLOW", "FULL", "FILE", 0, ["true", "_heli = vehicle this; _heli land 'GET OUT'; {_heli animateDoor [_x,1]} forEach ['door_back_L','door_back_R','door_L','door_R']; _heli lock false"], true] call COB_fnc_addWaypoint; waitUntil { {_x in _heli} count (units _group) < 1 }; _heli lock true; {_heli animateDoor [_x,0]} forEach ["door_back_L","door_back_R","door_L","door_R"]; waitUntil { {_x distance _heli > 15} count (units _group) == {alive _x} count (units _group)}; private "_wp3"; _wp3 = [_heliGroup, _startPos , "MOVE", "CARELESS", "BLUE", "FULL", "FILE", 0, ["true", "_group = group this; _heli = vehicle this; _units = crew _heli; {deleteVehicle _x} forEach _units; deleteVehicle _heli; deleteGroup _group"], true] call COB_fnc_addWaypoint; //return value if (!isNull _heli) then { ["[Extraction] function vehicle created."] call BIS_fnc_log; true } else { "[Extraction] function failed to create vehicle, make sure the wanted side center exists." call BIS_fnc_error; false };
  13. 0 = full health 1 = red jelly/pink mist/canoe head/brains all over the place
  14. I guess I didnt answer your question though, add your weapons into the weapon array and it will only show the display if those weapons are in the array. _victim = _this select 0; _killer = _this select 1; _weaponArray = ["arifle_MXM_Hamr_pointer_F","arifle_MX_SW_pointer_F"]; _weapon = currentWeapon _killer; if (_weapon in _weaponArray) then { createDialog "showWeapon_gui"; (uiNamespace getVariable 'showWeapon_gui') displayCtrl 1200 ctrlSetText getText (configFile >> "cfgWeapons" >> _weapon >> "picture"); };
  15. Hopefully this will get you in the right direction: description.ext #include "defines.hpp" #include <showWeapon.hpp> Dialog showWeapon.hpp //////////////////////////////////////////////////////// // GUI EDITOR OUTPUT START (by cobra4v320, v1.063, #Johike) //////////////////////////////////////////////////////// class showWeapon_gui { idd = -1; onLoad = "uiNamespace setVariable ['showWeapon_gui', _this select 0]"; class controls { class Killed_frame: RscFrame { idc = -1; x = 0.405125 * safezoneW + safezoneX; y = 0.379 * safezoneH + safezoneY; w = 0.190781 * safezoneW; h = 0.209 * safezoneH; }; class killed_pic: RscPicture { idc = 1200; x = 0.405125 * safezoneW + safezoneX; y = 0.379 * safezoneH + safezoneY; w = 0.18975 * safezoneW; h = 0.2068 * safezoneH; }; }; }; //////////////////////////////////////////////////////// // GUI EDITOR OUTPUT END //////////////////////////////////////////////////////// unitKilled.sqf _victim = _this select 0; _killer = _this select 1; _weapon = currentWeapon _killer; createDialog "showWeapon_gui"; (uiNamespace getVariable 'showWeapon_gui') displayCtrl 1200 ctrlSetText getText (configFile >> "cfgWeapons" >> _weapon >> "picture"); Place this into your enemy unit init line: this addEventHandler ["Killed", {[_this select 0, _this select 1] execVM "unitKilled.sqf"}]; When that unit is killed a picture of the rifle will pop up in the center of the screen. Hope this helps!!! You can also add the name of the killer or the rifle name in there as well.
  16. That makes sense and it would be easier and cleaner than a trigger.
  17. cobra4v320

    Objects on table

    That looks really good beerkan, downloading now.
  18. The eventhandler is a good idea but what if you use smoke for cover during the mission? I guess you could add the eventhandler once the mission reaches a certain point.
  19. Something like this then should work. Radio Trigger Cond: this && ((count ((markerpos "extractMrk") nearObjects ["smokeshell", 50])) > 0) On Act: _null = [] execVM "extractPos.sqf" extractPos.sqf _smokeArray = []; _smokeArray = (position player) nearObjects ["SmokeShell",50]; _smoke = _smokearray select 0; _smokePos = position _smoke; _extractPos = createVehicle ["Land_HelipadEmpty_F", _smokePos, [], 0, "NONE"]; Then you would need to create a waypoint to the _extractPos.
  20. cobra4v320

    Hide cargo containers

    Thats what I figured, thanks for the link to the feedback tracker.
  21. I'm trying to remove/hide several cargo containers on the map. I have tried all the usual methods of hiding static objects. I'm guessing at this point that you cannot remove/hide the static land_cargo containers off from the map. Inside of a Logic: (position this nearestObject "Land_Cargo20_military_green_F") hideObject true; If I use the editor and place the cargo container myself the code above works fine.
  22. I have made an extraction example that does this here: http://forums.bistudio.com/showthread.php?174429-Extraction-Example What you are trying to do wont work in a trigger.
  23. cobra4v320

    HALO issue

    Here is the link: http://forums.bistudio.com/showthread.php?174698-WIP-Von-Quest-Industries-H-A-L-O-System
  24. cobra4v320

    HALO issue

    Goblin is working on a much better version of the HALO jump. Its looking really good.
  25. cobra4v320

    HALO issue

    That sqs script doesnt work in Arma 3. If you want a basic HALO give the soldier a parachute then setPos the soldier. HALOED = TRUE; openMap true; if (backpack player != "b_parachute") then {player addbackpack "b_parachute"}; onMapSingleClick "player setPos [_pos select 0, _pos select 1, 2000]; hint 'Don''t forget to open your chute!'; HALOED = FALSE; "; waitUntil {!HALOED}; onMapSingleClick ""; openMap false;
×