Mattar_Tharkari
-
Content Count
961 -
Joined
-
Last visited
-
Medals
Posts posted by Mattar_Tharkari
-
-
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.
-
Edit:{_x setVelocity [-10, -10, 30]}forEach thislist
from Ashram 1-1 worked, thanks a lot! :D
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.
-
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";
-
{_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
-
Script it - much easier.
-
1st video clearly declares that if you had drones / satelites in the sky such gathering would not be easyEasier still because that area is inside the UNDOF Area of Limitation on the Golan. Syrian heavy weapons/armour/airforce are not allowed there.
-
-
dont group trigger
trigger activation: anybody
condition:
{_x in thislist} count units groupName == 0
-
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........
UN implicates Bashar al-Assad in Syria war crimesThe UN's human rights chief has said an inquiry has produced evidence that war crimes were authorised in Syria at the "highest level", including by President Bashar al-Assad.
-
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
-
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;
-
So now they're ambushing Irish troops...good luck to the rebels getting support any more support then they should from us if you kill one of our soldiers.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.
-
Nice work and nice photos!
-
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)
-
tip: you can use getBackpackCargo and the related commands to find out whats in the weaponHolder
-
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);
-
Does this not work?
_refuelTruckOne setFuelCargo 0;
https://community.bistudio.com/wiki/setFuelCargo
https://community.bistudio.com/wiki/Category:Scripting_Commands
-
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!
-
Is this on DEV branch at the mo?
-
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.
-
Hi allWhat the oil industry press are talking about:
Er no - read the bottom line:
By. Frank AclandFrank Acland is publisher and editor of E-Cat World
It's an LENR promoter posting a contribution (first and only) without editorial control.
In no way is the information contained on OilPrice.com to be considered factual or complete.Many of these sites (including forbes.com) allow contributions without fact checking or editorial analysis or control. Just because "it is written" doesn't mean anything.
Reference (closest) window
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted