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

Mattar_Tharkari

Member
  • Content Count

    961
  • Joined

  • Last visited

  • Medals

Everything posted by Mattar_Tharkari

  1. search for BIS_fnc_typeText
  2. Mattar_Tharkari

    Reference (closest) window

    http://forums.bistudio.com/showthread.php?168987-set-a-unit-to-look-out-of-window-function
  3. Mattar_Tharkari

    True/false and random numbers

    It's all about scope: http://community.bistudio.com/wiki/Variables#Scope if the variable is declared inside a control structure (i.e. if, for, switch, while) it can't be 'seen or read' outside the {}; and returns undefined errors. I think of it as the offside rule for sqf.
  4. That code will only work as long as the trigger is reset by the previous unit leaving the trigger area. If q1 stays within the trigger - the effect will not work for q2. Scripted solution: trigger name: trigger01 trigger text: trigger01 init.sqf: [trigger01,4] execVM "monitor.sqf"; run code on next 4 units entering trigger - only new entrants will be affected - existing units may remain in trigger. monitor.sqf private ["_temp","_list","_newGuy","_count","_trig"]; sleep 1; _trig = _this select 0; _num = _this select 1; if (!(typeOf _trig == "EmptyDetector")) exitWith {hint "error monitor.sqf param 0 is not trigger"}; monitor = true; _temp = []; _list = list _trig; _count = count _list; while {monitor} do { waitUntil {triggeractivated _trig}; if (count (list _trig) != _count) then { _newGuy = (list _trig) select (count (list _trig))-1; if (!(_newGuy in _temp)) then { _count = count (list _trig); _temp set [count _temp,_newGuy]; hint format ["%1 is the new guy in %2",_newGuy,triggerText _trig]; _newGuy playmove "AmovPercMstpSsurWnonDnon";//replace this line with your code }; }; if (count _temp == _num) exitWith {hint "trigger quota full monitor.sqf halt"; monitor = false;}; }; If you have something constant it is possible to do it without a script: BLUFOR Repeatedly Present condition: this && {!(animationState _x == "AmovPercMstpSsurWnonDnon")} count thisList > 0 OnAct: {_x playMove "AmovPercMstpSsurWnonDnon"; _x setCaptive true;} forEach thislist; That will make each unit that enters surrender and not affect those already present.
  5. Tested in game and worked for me? dont group trigger Have you named your group? eg (in leaders init): group1 = group this; #trigger activation: anybody #condition: {_x in thislist} count units group1 == 0 #trigger OnAct: hint "trigger Activated";
  6. {_x disableAI "ANIM";} forEach units groupName; //explosion, followed by {_x enableAI "ANIM";} forEach units groupName; groupName setBehaviour "CARELESS"; ??? http://community.bistudio.com/wiki/disableAI http://community.bistudio.com/wiki/setBehaviour To destroy a "Land_Communication_F" tower without an explosion: _nObject = nearestObject [player, "Land_Communication_F"]; _pos = getPosATL _nObject; _nObject setDamage 1; _smoke = "#particlesource" createVehicleLocal _pos; _smoke setParticleClass "MediumSmoke"; _smoke setPosATL _pos; or use BIS_fnc_sceneSetBehaviour ["disableAI",(units groupName),0] call BIS_fnc_sceneSetBehaviour
  7. Mattar_Tharkari

    Syria - What should we do if anything?

    Easier still because that area is inside the UNDOF Area of Limitation on the Golan. Syrian heavy weapons/armour/airforce are not allowed there.
  8. Mattar_Tharkari

    A question about retexturing

    New tools are in Steam: http://dev.arma3.com/techrep-00001
  9. dont group trigger trigger activation: anybody condition: {_x in thislist} count units groupName == 0
  10. Mattar_Tharkari

    EventHandler "Take"?

    Iceman'scode was for a script - to use in the trigger directly: truckname: truck01 truck init this addMagazineCargo ["SatchelCharge_Remote_Mag",20]; trigger: activation: anybody condition: {_x == "satchelCharge_remote_mag"} count magazineCargo truck01 < 20 && vehicle player in thisList (note: you had the classname wrong - ammo is what you place - you need the mag from cfgMagazines)
  11. Mattar_Tharkari

    Syria - What should we do if anything?

    And........ http://www.bbc.co.uk/news/world-middle-east-25189834
  12. Mattar_Tharkari

    attachTo and backpacks

    bp1 = "B_AssaultPack_blk" createVehicle position player; bp2 = nearestObject [bp1, "GroundWeaponHolder"]; bp2 attachTo [m1, [0.45,0.1,-0.5],"lefthandmiddle1"]; bp2 setVectorDirAndUp [[0,0,-1],[3,0.5,0]]; There are other points apart from pelvis - including: rightarm righthand lefthand head rightleg rightlegroll rightfoot righttoebase leftforearmroll rightforearmroll leftleg leftlegroll leftfoot lefttoebase righthandindex1 righthandindex2 righthandindex3 righthandmiddle1 righthandmiddle2 righthandmiddle3 righthandpinky1 righthandpinky2 righthandpinky3 righthandring1 righthandring2 righthandring3 righthandthumb1 righthandthumb2 righthandthumb3 righthandring lefthandindex1 lefthandindex2 lefthandindex3 lefthandmiddle1 lefthandmiddle2 lefthandmiddle3 lefthandpinky1 lefthandpinky2 lefthandpinky3 lefthandring1 lefthandring2 lefthandring3 lefthandthumb1 lefthandthumb2 lefthandthumb3 lefthandring leftupleg leftuplegroll neck neck1 pelvis spine spine1 spine2 spine3 leftshoulder leftarm leftarmroll leftforearm rightshoulder rightupleg rightarmroll rightforearm rightuplegroll camera face_browfrontright face_cheekupperright face_cheekupperleft face_nostrilright face_nostrilleft face_forehead face_eyelidlowerleft face_browfrontleft face_browsideright face_browsideleft face_eyelidlowerright face_hub face_eyelids face_cheeksideright face_cornerleft face_cheeksideleft face_eyelidupperright face_eyelidupperleft face_cornerright face_jawbone face_chin face_chopright face_chopleft face_liplowermiddle face_liplowerright face_liplowerleft face_tongue face_cheekfrontright face_cheekfrontleft face_lipuppermiddle face_lipupperright face_lipupperleft face_browmiddle face_jowl eyeleft eyeright
  13. Mattar_Tharkari

    Break cycle waypoint by Script only

    fnc_killCycle = { _vcl = _this select 0; _wpArray = waypoints _vcl; for "_i" from 0 to (count _wpArray)-1 do { _wp = _wpArray select _i; _type = waypointType _wp; if (_type == "CYCLE" ) then { _wp setWaypointType "MOVE";//or delete it }; }; }; [vehicleName] call fnc_killCycle;
  14. Mattar_Tharkari

    Syria - What should we do if anything?

    Well who knows who did what but the main local group is Yarmouk Martyrs Brigade and have been involved in UN kidnappings before. Is a MOWAG T-72 proof? http://www.youtube.com/watch?v=R0rO-Q7pjc4 Attacks directly on Irish troops this month could be related to Minister Shatter's November Middle East tour. Somebody may have disagreed with something or who he met, maybe? Many people interpret a greeting and a hand shake to mean more than it actually does.
  15. Nice work and nice photos!
  16. Mattar_Tharkari

    EventHandler "Take"?

    Bit of a muddle there :) You need to add the EH to the player not the trigger. I would have used it like this _EHtakeIdx = player addEventHandler ["Take", {_this execVM "whatHeTook.sqf"}]; whatHeTook.sqf EH passes [unit, container, item] _unit = _this select 0; _container = _this select 1; _item = _this select 2; if ((_item == "satchelCharge_remote_mag") && vehicle player in list triggerName) then {hint "By jove, he's got it!";}; (untested)
  17. Mattar_Tharkari

    setpos on backpack

    tip: you can use getBackpackCargo and the related commands to find out whats in the weaponHolder
  18. Mattar_Tharkari

    Getting object by string name

    well (if I understand the question??) generally you would do this: _hdl = [objectName] execVM "someScript"; //or [objectName] call someFunction; //or [objectName] spawn {someThing}; then in the script: _object = _this select 0; another way is to save the object as a variable: _veh = createVehicle ["B_G_Quadbike_01_F", position player, [], 0, "NONE"]; missionNamespace setVariable ["refString",_veh];//"refString" can be anything you like but try to make it unique so it doesn't get overwritten In a script _veh = missionNamespace getVariable "refString"; _veh setDamage 1; will return the object reference If you create multiple vehicles: _vehArr = [] _vehrefArr = [] for "_i" from 0 to 9 do { _veh = createVehicle ["B_G_Quadbike_01_F", position player, [], 0, "NONE"]; _ref = format ["quad%1",_i]; missionNamespace setVariable ["_ref",_veh]; _vehArr set [count _vehArr,_veh]; _vehrefArr set [count _vehrefArr,_ref]; }; missionNamespace setVariable ["quadVehicles",_vehArr]; missionNamespace setVariable ["quadVehRefs",_vehrefArr]; You now have 3 ways of accessing the stored data in another script: _vehref = missionNamespace getVariable "quad9"; //the individual vehicles - strings "quad0" - "quad9" _vehArr = missionNamespace getVariable "quadVehicles";//array of vehicles _vehArr select 0 to _vehArr select 9; _vehrefArr = missionNamespace getVariable "quadVehRefs";//array of reference strings ["quad0" ..."quad9"] _my1stVeh = missionNamespace getVariable (_vehrefArr select 0);
  19. Does this not work? _refuelTruckOne setFuelCargo 0; https://community.bistudio.com/wiki/setFuelCargo https://community.bistudio.com/wiki/Category:Scripting_Commands
  20. Mattar_Tharkari

    Dead Body WeaponHolder

    More types of weapon holder than that in A3? Maybe dead bodies uses one of the others? Will try and test that when I get time - busy at moment.
  21. Mattar_Tharkari

    ISON thread - coming soon to our skies

    Yeah but not much left - not going to be the Xmas show we were looking forward to. Does this mean Jesus isn't coming back this year? I suppose the Popes relieved, not been in the job long enough to really achieve anything yet.
  22. Mattar_Tharkari

    ISON thread - coming soon to our skies

    Awwwww sun has 'eaten' it!
  23. Mattar_Tharkari

    Class names for black MX rifles?

    Is this on DEV branch at the mo?
  24. Mattar_Tharkari

    How to do the UAV sitrep thing?

    If you create a camera in the init or with a script run from the init - eg: _cam01 = createVehicle ["camera", _camPos, [], 0, "CAN_COLLIDE"]; _cam01 camPrepareTarget _targetPos; _cam01 cameraEffect ["INTERNAL", "BACK", "rendertarget1"]; _cam01 camPrepareFov 0.700; _cam01 camCommitPrepared 0; waitUntil{camCommitted _cam01}; _laptop setObjectTextureGlobal [0, "#(argb,512,512,1)r2t(rendertarget1,1.0)"]; You must delay it till after BIS_fnc_establishingShot has completed or the "rendertarget" will fail and display a black or white screen. Use something like: waitUntil {!isNull player}; //or waitUntil {!isNil {BIS_missionStarted }}; in the script before the camera is created. How or why this bug occurs I don't know, but if your camera textures fail or work intermittently or BIS_fnc_establishingShot cuts to the player internal cam - this could be the cause. Updated - if you use the debug console camera during the mission it also affects rendertargets so: enableDebugConsole = 0; in the init.
×