Jump to content

thebarricade

Member
  • Content Count

    113
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by thebarricade

  1. thebarricade

    Player Halo JUMP Script

    And hence why it's a parameter :D
  2. thebarricade

    Player Halo JUMP Script

    I did it this way, and it seems to work (saved as tbr_halo.sqf) _host = _this select 0; _caller = _this select 1; _id = _this select 2; _params = _this select 3; _startHeight = _params select 0; //in objects init-field: //this addAction ["HALO", "tbr_halo.sqf", [200], 6, true, true, "", "true", 3, false, ""]; // the [200] parameter is the insertion height systemChat "Left click on the map where you want to insert."; systemChat "Or close map to abort."; tbr_mapclick = false; tbr_halopos = []; openMap true; [ "tbr_haloSelect", "onMapSingleClick", { tbr_halopos = _pos; tbr_mapclick = true; }, [] ] call BIS_fnc_addStackedEventHandler; waitUntil {tbr_mapclick or !visibleMap}; ["tbr_haloSelect", "onMapSingleClick"] call BIS_fnc_removeStackedEventHandler; if(tbr_mapclick) then { _caller setPos [tbr_halopos select 0, tbr_halopos select 1, _startHeight]; [_caller, _startHeight] spawn BIS_fnc_halo; systemChat "Remember to open chute :)"; } else { systemChat "Jump cancelled."; }; openMap false;
  3. Is any of the official tools capable of building a mission pbo from the commandline? I have a bunch of missions that use a common framework and would like to be able to batch update them, instead of going into 3den and building one mission at a time.
  4. Armake worked like a charm :) Thank you!
  5. It has So in order: 1) I used Addon Builder via Arma 3 Tools 2) I unpacked the pbo using Eliteness and found no major differences (a CfgMod section had been added) 3 & 4) Changed requiredAddond, added units line. No difference, unfortunately. 5) Already tried that. So not an inch closer...
  6. So, I have made a small addon which makes the various NVGs in A3 fullscreen (for me and my group), but I have encountered one problem which seems kind of troublesome. When I add a unit via the editor everything works as I think it should, but if I then edit the units inventory, my mod gets added as an dependency for the mission. This obviously breaks the mission for basically everyone else in the world. Does anyone know how to stop that from happening? My config.cpp currently looks like this: class CfgPatches { class tbr_nvg { author = "thebarricade"; name = "TBR Fullscreen NVGs"; requiredVersion = 0.1; requiredAddons[] = {"A3_Data_F_Exp"}; }; }; class CfgWeapons { class Binocular; class NVGoggles: Binocular { modelOptics = ""; }; class O_NVGoggles_hex_F: NVGoggles { modelOptics = ""; }; class O_NVGoggles_urb_F: O_NVGoggles_hex_F { modelOptics = ""; }; ... snipped a bunch of lines ... }; One creepy way of making it work is: class CfgPatches { class A3_Weapons_F_Exp {}; }; But I don't really feel comfortable doing that (unless that is the actual, proper way of doing it).
  7. ...in a chimney at the Tanoa Sugar Company. (no addons)
  8. Thanks for this great immersion mod! Just one question, is there any way to kill the greek music, while keeping the military radio chatter? (Knowing myself, it's probably a really obvious way, and i'm to stupid to realise/see it)
  9. thebarricade

    TBR Pointer

    A simple utility to point stuff out to your (coop) teammates... The objects has a 10 second lifetime (and you can only point out one thing at the time, point out a new location before the lifetime is up, resets the clock). The menu-actions are bound to User15 and User16 actions as well, for quick activation. Now has stable multiplayer respawn and reload. Download at: * GitHub * Armaholic Pics! Spheres: http://i44.tinypic.com/s3n5z8.png Circle: http://i39.tinypic.com/xfyg51.png This may or may not be bugridden, caveat emptor! The mod might be improved by some custom objects, but I suck at modelling (and making addons in general) so probably not.
  10. thebarricade

    TBR Pointer

    Thanks! I really hope so, otherwise I'll have a look at it (it works after a "resume", at least). And thanks for the linkage Foxhound!
  11. I can confirm this problem on my machine as well.
  12. thebarricade

    Patrol Operations 2

    Great set of missions! When we're playing "Patrol Ops 2.05 US Army South" I get a (repeating) error in my rpt-file though... Error Zero divisor File mpmissions\__cur_mp.Takistan\mps\func\mps_func_getrandomarrayelement.sqf, line 7 Error in expression <ndom (count _array)); _element = _array select _j; _element> Error position: <select _j; This error takes up something like 95% of a 7mb+ rpt-file, and might be the reason behind a severe stutter that occurs for me after playing a while (like one and a half mission into a game). Otherwise, as previously mentioned, a fantastic set of missions!
  13. I've made a smallish script which forces AI-pilots to actually take-off in a C130, instead of crashing into trees, hills, fences or whatever. It isn't extremely realistic, but if we pretend the C130's are using rocket-assisted take-off, it's easier to accept. :) I've tested it on all runways in Chernarus, and as long as the plane starts from the south-east (roughly), it manages to get airborne. Now the script is capable of getting a plane airborne whereever there is a strip of flat land without obstructions... Also tested on FDF Podagorsk, where it manages to clear that pesky hill at the end of the runway. Usage: [plane1, 70, 300, 0.35, 200, 15] execvm "tbr_fnc_takeoff.sqf"; Needs the BIS Functions-module placed on the map! takeoff_su34.utes.7z Now the mission-author has more control over climb-angle, takeoff speed and some more things... _plane // the plane that is forced to take-off _release_height // the script will control the plane until it reaches this height (meters) _height // height the plane should fly in (meters, via flyInHeight, the AI should take care of this) _acc // some sort of acceleration-factor (0.25 is good for the C130, 0.35 seems to fit the Su34) _to_speed // the plane should take-off at this speed (in kph) _climb_angle // and use this climb-angle (in degrees, somewhere between 15 and 20 degrees, or the script seems to have problem ascending to release-height)
  14. Yep, I'm throwing my hat into the ring with yet another airdrop script. :cool: Script and example-mission. The script (tbr_airdrop.sqf): /* Simple airdrop with script-support Version: 1.1 Thanks to Desrat for fixing "unresponsive" drops. params: caller, // calling unit (object) vehicle, // class of airplane doing the drop (string) approachFrom, // approach vector (0-359) (-1 for random approach) (numeric) flyHeight, // aircraft altitude (numeric) dropAt, // starting drop position (multiple packages will be dropped at intervals) (position) interval, // interval in seconds between drops (numeric) scripts, // [ "ingress-script", "approach-script", "egress-script"] items-array // [ [ "parachuteclass", "droppeditemclass", "script-to-run-on-item-drop", "script-to-run-on-item-after-touch-down" ], [ "parachuteclass", "droppeditemclass", "script-to-run-on-item-drop", "script-to-run-on-item-after-touch-down" ] ] (array) parachuteclasses: ParachuteMediumWest ParachuteMediumEast ParachuteBigWest ParachuteBigEast ingress-script: gets called with two parameters: caller (object), drop-vehicle (object) approach-script: gets called with two parameters: caller (object), drop-vehicle (object) egress-script: gets called with two parameters: caller (object), drop-vehicle (object) script-to-run-on-item-drop: gets called with three parameters: caller (object), drop-vehicle (object), package (object) script-to-run-on-item-after-touch-down: gets called with two parameters: caller (object), package (object) example: _n = [player, "c130j", 270, 200, getMarkerPos "mk_drop", 3, ["tbr_airdrop\ingress.sqf","tbr_airdrop\approach.sqf","tbr_airdrop\egress.sqf"], [["ParachuteMediumWest","USBasicAmmunitionBox_EP1","tbr_airdrop\announce.sqf",""],["ParachuteBigWest","HMMWV_M1035_DES_EP1","tbr_airdrop\announce.sqf","tbr_airdrop\explode.sqf"]]] execVM "tbr_airdrop\tbr_airdrop.sqf"; uses a c130 to drop a ammo-box and a hmmwv (which blows up on touchdown thanks to a called script), both drops announced by the c130 (via script) */ private ["_approachFrom", "_interval", "_calc_point", "_caller", "_vehicleClass", "_dropAt", "_packages", "_flyHeight", "_dir", "_spawn_distance", "_spawn_pos", "_exit_pos", "_side", "_grp", "_vehicle", "_pilot", "_wp_drop", "_wp_exit"]; if( TBR_support_in_progress ) exitWith{ hint "Support already in progress"; }; _calc_point = { private ["_position", "_direction", "_distance", "_point", "_pos_x", "_pos_y", "_pos_z", "_off_x", "_off_y"]; _position = _this select 0; _direction = _this select 1; _distance = _this select 2; // ------------------------------------------------------ _point = [0,0,0]; _pos_x = _position select 0; _pos_y = _position select 1; _pos_z = _position select 2; _off_x = sin(_direction) * _distance; _off_y = cos(_direction) * _distance; _point = [_pos_x + _off_x, _pos_y + _off_y, _pos_z]; _point; }; _caller = _this select 0; _vehicleClass = _this select 1; _approachFrom = _this select 2; _flyHeight = _this select 3; _dropAt = _this select 4; _interval = _this select 5; _scripts = _this select 6; _packages = _this select 7; if( _approachFrom == -1 ) then { _approachFrom = round(random 360); } else { // randomize the approach angle somewhat _approachFrom = (_approachFrom + (5 - round(random 10))); }; // set dropinterval if zero (2-5 seconds) if( _interval == 0 ) then { _interval = 2 + round(random 3); }; _dir = _approachFrom - 180; _spawn_distance = viewDistance + 100; _spawn_pos = [_dropAt, _approachFrom, _spawn_distance] call _calc_point; _exit_pos = [_dropAt, _dir + (45 - round(random 90)), _spawn_distance] call _calc_point; _side = side _caller; _grp = createGroup _side; TBR_support_in_progress = true; TBR_drop_here = false; publicVariable "TBR_support_in_progress"; _vehicle = createVehicle [_vehicleClass, [_spawn_pos select 0, _spawn_pos select 1, (_spawn_pos select 2) + _flyHeight], [], 0, "FLY"]; _vehicle setDir _dir; _vehicle setVelocity [sin(_dir)*55,cos(_dir)*55,0]; // roughly 200kph _pilot = _grp createUnit ["USMC_Soldier_Pilot", [0,0,0], [], 0, "FORM"]; _pilot assignAsDriver _vehicle; _pilot moveInDriver _vehicle; _vehicle flyInHeight _flyHeight; // calling ingress-script if( (_scripts select 0) != "" ) then { [_caller, _vehicle] execVM (_scripts select 0); }; // setup waypoints _wp_drop = _grp addWaypoint [_dropAt, 50]; _wp_drop setWaypointType "MOVE"; _wp_drop setWaypointSpeed "LIMITED"; _wp_drop setWaypointStatements ["true", "TBR_drop_here = true;"]; _wp_exit = _grp addWaypoint [_exit_pos, 200]; _wp_exit setWaypointType "MOVE"; _wp_exit setWaypointSpeed "FULL"; _wp_exit setWaypointStatements ["true", "TBR_support_in_progress = false;"]; // monitoring approach if( (_scripts select 1) != "" ) then { [_caller, _vehicle, _dropAt, (_scripts select 1)] spawn { private ["_caller", "_dropper", "_droppt", "_script"]; _caller = _this select 0; _dropper = _this select 1; _droppt = _this select 2; _script = _this select 3; waitUntil{ ((getPos _dropper) distance _droppt) < 700 }; // running approach-script [_caller, _dropper] execVM _script; }; }; waitUntil{ TBR_drop_here or !(alive _vehicle) }; if( !(alive _vehicle) ) exitWith{ TBR_support_in_progress = false; publicVariable "TBR_support_in_progress"; }; { [_vehicle, _x select 0, _x select 1, _x select 2, _x select 3, _caller] spawn { private ["_chute", "_smoke", "_touchDownPos", "_vel", "_dropper", "_chuteType", "_package", "_scriptAfter", "_scriptBefore", "_chutePos", "_drop", "_caller"]; _dropper = _this select 0; _chuteType = _this select 1; _package = _this select 2; _scriptBefore = _this select 3; _scriptAfter = _this select 4; _caller = _this select 5; _chutePos = [(getpos _dropper select 0), (getPos _dropper select 1)-10, (getPos _dropper select 2)-10]; // create the dropped object _drop = _package createVehicle _chutePos; _touchDownPos = []; if( _scriptBefore != "" ) then { [_caller, _dropper, _drop] execVM _scriptBefore; }; if( _chuteType != "" ) then { // using parachute _chute = _chuteType createVehicle _chutePos; _chute setPos _chutePos; _drop setpos _chutePos; _drop attachto [_chute, [0, 0, 0]]; // add green smoke while dropping _smoke = "SmokeShellgreen" createVehicle _chutePos; _smoke attachto [_drop, [0, 0, 0]]; waitUntil {((getPos _drop) select 2) < 1}; detach _drop; detach _smoke; deleteVehicle _smoke; _touchDownPos = getPos _drop; } else { // no paracute, so it's freefalling _vel = velocity _dropper; // create a smokegrenade and use that as the "anchor" since it's affected by gravity _smoke = "SmokeShellgreen" createVehicle _chutePos; _drop attachto [_smoke, [0, 0, 0]]; // set velocity vector to that of the plane, so the object falls somewhat realistically... _smoke setVelocity _vel; waitUntil {((getPos _smoke) select 2) < 1}; _touchDownPos = getPos _smoke; detach _drop; deleteVehicle _smoke; }; deleteVehicle _drop; _drop = _package createVehicle [(_touchDownPos select 0), (_touchDownPos select 1), 0]; // create a new smokesource "SmokeShellgreen" createVehicle [(_touchDownPos select 0), (_touchDownPos select 1), 0]; if( _scriptAfter != "" ) then { [_caller, _drop] execVM _scriptAfter; }; }; sleep _interval + (random 2); } forEach _packages; waitUntil{ !TBR_support_in_progress or !(alive _vehicle) }; if( !(alive _vehicle) ) exitWith{ TBR_support_in_progress = false; publicVariable "TBR_support_in_progress"; }; // running egress-script if( (_scripts select 2) != "" ) then { [_caller, _vehicle] execVM (_scripts select 2); }; sleep 1; // cleanup deleteVehicle _pilot; deleteVehicle _vehicle; deleteGroup _grp; TBR_support_in_progress = false; publicVariable "TBR_support_in_progress"; Possible MP support, add to init.sqf (completely untested and will probably fail horribly): if (isNil "TBR_support_in_progress") then { TBR_support_in_progress = false; }; "TBR_support_in_progress" addPublicVariableEventHandler { TBR_support_in_progress = (_this select 1); }; Comments and critisism are welcome.
  15. Are you using the "Ambient Civilians" or "Ambient Civilians (expansion)" module? (Oh, and this should probably be moved to the mission editing sub-forum)
  16. There seems to be an error in the config for the MG69. Note how all "range"-classes inherits from "close" (which incidently is up to 50 meters). If they where to get their inheritence from the correct class (short: short, medium: medium, far: far), it would probably work as intended. class KPFS_MG69: M240 { scope = 2; model = "\kpfs_tri_weap\mg69"; displayName = "MG69"; picture = "\kpfs_tri_weap\data\icons\w_mg69_ca.paa"; UiPicture = "\CA\weapons\data\Ico\i_mg_CA.paa"; weaponInfoType = "RscWeaponZeroing"; discreteDistance[] = {200,300,400,500,600,800,1000,1200}; discreteDistanceInitIndex = 1; reloadMagazineSound[] = {"\kpfs_tri_weap\sound\mg3_reload",0.0562341,1,25}; magazineReloadTime = 4; class manual: manual { displayName = "MG-69"; recoil = "recoil_auto_machinegun_8outof10"; recoilProne = "recoil_auto_machinegun_prone_5outof10"; dispersion = 0.0012; reloadTime = 0.0545; begin1[] = {"\kpfs_tri_weap\sound\mg3_fire1",1.77828,1,1300}; soundBegin[] = {"begin1",1}; maxRange = 10; maxRangeProbab = 0.04; showToPlayer = 1; }; class close: close { begin1[] = {"\kpfs_tri_weap\sound\mg3_fire1",1.77828,1,1300}; soundBegin[] = {"begin1",1}; }; class short: close { begin1[] = {"\kpfs_tri_weap\sound\mg3_fire1",1.77828,1,1300}; soundBegin[] = {"begin1",1}; }; class medium: close { begin1[] = {"\kpfs_tri_weap\sound\mg3_fire1",1.77828,1,1300}; soundBegin[] = {"begin1",1}; }; class far: close { begin1[] = {"\kpfs_tri_weap\sound\mg3_fire1",1.77828,1,1300}; soundBegin[] = {"begin1",1}; }; class Library { libTextDesc = "MG3 version of Trizonesia"; }; }; Don't know if that helps you in any way, but there it is :)
  17. When creating/editing multiplayer missions it would be terrific to run be able to run two clients on the same pc (I'm talking about two actual instances of arma2, not one arma2 and one dedicated server). When I tested this I got the dreaded "Illegal copies may degrade"-message, which made med feel a bit hesitant on continue testing this. So my question (since I haven't come up with anything via search): Is this possible? Or will my game suffer FADE?
  18. So long story short; basically no, then...
  19. thebarricade

    weaponslots help

    Could BIS_fnc_invSlots be of any use to you? Although it takes a unit as an in-parameter I suppose the code could be adapted for your use... It returns an array of slots [0,0,0,0,0,0,0,0] in this order: #define WeaponSlotPrimary 1 // primary weapons #define WeaponSlotHandGun 2 // HandGun #define WeaponSlotSecondary 4 // secondary weapons #define WeaponSlotHandGunItem 16 // HandGun magazines #define WeaponSlotItem 256 // items #define WeaponSlotBinocular 4096 // binocular #define WeaponHardMounted 65536 #define WeaponSlotInventory 131072 // inventory items
  20. thebarricade

    Gear dialog

    Thanks! I'll try that out.
  21. I was wondering; is there any way to start a script when the gear dialog is shown (both in the case of pressing the Gear-key, and opening it via the action-menu)?
  22. thebarricade

    G36 sight ranges, range finder, aimpoint

    Is it this aimpoint you're talking about? (Use the "Optics Mode" key to switch to and from it)
  23. thebarricade

    New Mission: [CO-14]Infiltration(OA)

    Just wanted to say that this a really fun mission! One question; are the order of the "missions" random, or do they have a fixed order?
  24. thebarricade

    Yet another airdrop script

    Honestly I have no idea on why you can't pick up the gear in the box... This may or may not work for map click (hopefully it gives you some hints on what to do): onMapSingleClick "_n = [player, 'c130j', 270, 200, _pos, 3, ['tbr_airdrop\ingress.sqf','tbr_airdrop\approach.sqf','tbr_airdrop\egress.sqf'], [['ParachuteMediumWest','USBasicAmmunitionBox_EP1','tbr_airdrop\announce.sqf',''],['ParachuteBigWest','HMMWV_M1035_DES_EP1','tbr_airdrop\announce.sqf','tbr_airdrop\explode.sqf']]] execVM 'tbr_airdrop\tbr_airdrop.sqf'; onMapSingleClick ''; true;"
×