Jump to content

Mattar_Tharkari

Member
  • Content Count

    961
  • Joined

  • Last visited

  • Medals

Posts posted by Mattar_Tharkari


  1. 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.


  2. {_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 


  3. 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)


  4. 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


  5. 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.


  6. 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)


  7. 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);


  8. 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.


  9. 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.


  10. Hi all

    What the oil industry press are talking about:

    Er no - read the bottom line:

    By. Frank Acland

    Frank 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.

×