

Mattar_Tharkari
Member-
Content Count
961 -
Joined
-
Last visited
-
Medals
Everything posted by Mattar_Tharkari
-
how to do rolling jumbled text in intros
Mattar_Tharkari replied to Azza FHI's topic in ARMA 3 - MISSION EDITING & SCRIPTING
search for BIS_fnc_typeText -
Reference (closest) window
Mattar_Tharkari replied to adanteh's topic in ARMA 3 - MISSION EDITING & SCRIPTING
http://forums.bistudio.com/showthread.php?168987-set-a-unit-to-look-out-of-window-function -
True/false and random numbers
Mattar_Tharkari replied to -TFP- Bridge.J's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
How to run a script just to the unit that is on the trigger.
Mattar_Tharkari replied to Icaruk's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Trigger question: Not present but also not dead.
Mattar_Tharkari replied to surfer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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"; -
Explosion without alerting enemies, or reset alert state
Mattar_Tharkari replied to NickThissen's topic in ARMA 3 - MISSION EDITING & SCRIPTING
{_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 -
How to run a script just to the unit that is on the trigger.
Mattar_Tharkari replied to Icaruk's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Script it - much easier. -
Easier still because that area is inside the UNDOF Area of Limitation on the Golan. Syrian heavy weapons/armour/airforce are not allowed there.
-
A question about retexturing
Mattar_Tharkari replied to spcland12's topic in ARMA 3 - MISSION EDITING & SCRIPTING
New tools are in Steam: http://dev.arma3.com/techrep-00001 -
Trigger question: Not present but also not dead.
Mattar_Tharkari replied to surfer's topic in ARMA 3 - MISSION EDITING & SCRIPTING
dont group trigger trigger activation: anybody condition: {_x in thislist} count units groupName == 0 -
EventHandler "Take"?
Mattar_Tharkari replied to Festa_PWR's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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) -
And........ http://www.bbc.co.uk/news/world-middle-east-25189834
-
attachTo and backpacks
Mattar_Tharkari replied to wok's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 -
Break cycle waypoint by Script only
Mattar_Tharkari replied to Johnson11B2P's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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; -
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.
-
Usable cargo ramp for CH-49 Mohawk
Mattar_Tharkari replied to zgmrvn's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Nice work and nice photos! -
EventHandler "Take"?
Mattar_Tharkari replied to Festa_PWR's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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) -
setpos on backpack
Mattar_Tharkari replied to yourry's topic in ARMA 3 - MISSION EDITING & SCRIPTING
tip: you can use getBackpackCargo and the related commands to find out whats in the weaponHolder -
Getting object by string name
Mattar_Tharkari replied to chronicsilence's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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); -
Changing vehicleClass with script?
Mattar_Tharkari replied to K120's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Does this not work? _refuelTruckOne setFuelCargo 0; https://community.bistudio.com/wiki/setFuelCargo https://community.bistudio.com/wiki/Category:Scripting_Commands -
Dead Body WeaponHolder
Mattar_Tharkari replied to iceman77's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
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.
-
Awwwww sun has 'eaten' it!
-
Class names for black MX rifles?
Mattar_Tharkari replied to roguetrooper's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Is this on DEV branch at the mo? -
How to do the UAV sitrep thing?
Mattar_Tharkari replied to SpaydCBR's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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.