Jump to content

Twiznak

Member
  • Content Count

    157
  • Joined

  • Last visited

  • Medals

Posts posted by Twiznak


  1. 2 hours ago, Tankbuster said:

    That's pretty much what I had in mind, yes, thank you.

    Note that a single shot kill won't register using your code though. Hit EH doesn't activate when a unit is killed.

     

    You're right. I read that in the event handler description. You could use the same approach with a "Dammaged" event handler. If the damage received is enough to kill the unit out right , then remoteExec the addHit.sqf. That might work. 


  2. 1 hour ago, Tankbuster said:

    Thanks! Don't need a working example as such - just a few pointers 🙂

    Hello again. I quickly realized that without a working example to show you, it would be nigh impossible for me to explain myself. Don't worry, nothing crazy😎

     

    initPlayerLocal.sqf

    Spoiler
    
    profilenamespace setVariable ["myShotsFired",0.00];
    profilenamespace setVariable ["myShotsHit",0.00];
    
    player addEventHandler ["Fired", {
    	params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
    	["addShot.sqf"] remoteExec ["execVM", (owner _unit)];
    }];
    
    player addAction 
    [
    	"<t color='#FF0000'>My Accuracy Rating</t><img size='1' image='\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\use_ca'/>",  
    	"
    	_target = (_this select 0);
    	_caller = (_this select 1);
    	_targetPC = Owner _target;
    	_A = profileNamespace getVariable 'myShotsFired';
    	_B = profileNamespace getVariable 'myShotsHit';
    	_shotsMissed = _A - _B;
    	_ratio = _B / _shotsMissed;
    	_accRate = _ratio *100;
    	
    	parseText format ['<t size=''1.0'' font=''PuristaMedium'' color=''#ef2525''>Accuracy: %1 Percent</t>', _accRate] remoteExec ['Hint',_targetPC,false];
    	",
    	[],1,false,true,"", ""
    ];

     

     

    addShot.sqf

    Spoiler
    
    _val = profileNamespace getVariable "myShotsFired";
    _val = _val + 1.00;
    profileNamespace setVariable ["myShotsFired",_val];

     

     

    addHit.sqf

    Spoiler
    
    _val = profileNamespace getVariable "myShotsHit";
    _val = _val + 1.00;
    profileNamespace setVariable ["myShotsHit",_val];

     

     

    Code added to the initiation fields of all opfor units placed in the editor:

    Spoiler
    
    this disableAI "MOVE"; 
    this disableAI "ANIM"; 
    this disableAI "TARGET"; 
    this disableAI "AUTOTARGET"; 
    this disableAI "FSM"; 
    this setUnitPos "UP"; 
    this addEventHandler ["Hit", { 
     params ["_unit", "_source", "_damage", "_instigator"]; 
     ["addHit.sqf"] remoteExec ["execVM", (owner _instigator)]; 
    }];

     

     

    Explanation:

    You're smart enough to understand what's going on, quicker by reading it, than by me trying to word it up and act smart😁. Let me know if you have any question. Happy to help!

    • Like 2

  3. Hello! I have an issue that is causing Arma 3 tools Publisher to crash 1 second after it starts. PLEASE HELP ME. If you can't, please point me to the place where I need to ask.

     

    The error message the repeats in the arma3Publisher.rpt 

      

    Spoiler
    
    2021-11-23 12:01:55,047 [FATAL] 1 (:0): SharedResources.ApplicationBase.CurrentDomain_UnhandledException - System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
       at System.Windows.Media.Composition.DUCE.Channel.SyncFlush()
       at System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget, Nullable`1 channelSet)
       at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
    2021-11-23 12:01:55,051 [ERROR] 1 (:0): Publisher.App.HandleUnhandledException - System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
       at System.Windows.Media.Composition.DUCE.Channel.SyncFlush()
       at System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget, Nullable`1 channelSet)
       at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

    here is a copy and paste of the whole arma3Publisher.rpt from today 11/23/21.  I tried to launch the publisher 13 times. The last try is at timestamp 12:00

    Spoiler
    
    
    2021-11-23 12:00:44,887 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Current dir: C:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools
    2021-11-23 12:00:44,898 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Command line: "C:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools\Publisher\Publisher.exe"
    2021-11-23 12:00:44,898 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - OS Version: Microsoft Windows NT 6.2.9200.0
    2021-11-23 12:00:44,898 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - OS 64bit: True
    2021-11-23 12:00:44,898 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Process 64bit: False
    2021-11-23 12:00:44,899 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Personal dir: C:\Users\green\Documents
    2021-11-23 12:00:44,899 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Local App Data dir: C:\Users\green\AppData\Local
    2021-11-23 12:00:44,899 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Compatibility flags: -
    2021-11-23 12:00:44,926 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Render Capability - Tier: 2 (0x20000)
    2021-11-23 12:00:44,927 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Render Capability - Max Hardware Texture Size: 16384,16384
    2021-11-23 12:00:44,927 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Render Capability - PS 2.0 (DirectX 9): HW = True, SW = True
    2021-11-23 12:00:44,927 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Render Capability - PS 3.0 (DirectX 9c): HW = True, SW = False
    2021-11-23 12:00:44,927 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Render Capability - PS 4.0 (DirectX 10): HW = False, SW = False
    2021-11-23 12:00:44,927 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Render Capability - PS 4.1 (DirectX 10.1): HW = False, SW = False
    2021-11-23 12:00:44,927 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Render Capability - PS 5.0 (DirectX 11.0): HW = False, SW = False
    2021-11-23 12:00:44,929 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Visual C++ 2010 Runtime installed: True (version v10.0.40219.325)
    2021-11-23 12:00:44,929 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Visual C++ 2012 Runtime installed: True (version v11.0.61030.00, is from DevDiv: False)
    2021-11-23 12:00:44,929 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Visual C++ 2013 Runtime installed: True (version v12.0.21005.01, is from DevDiv: False)
    2021-11-23 12:00:44,929 [INFO] 1 (:0): Publisher.App..ctor - 
    2021-11-23 12:00:44,929 [INFO] 1 (:0): Publisher.App..ctor - 
    2021-11-23 12:00:44,929 [INFO] 1 (:0): Publisher.App..ctor - 
    2021-11-23 12:00:44,930 [INFO] 1 (:0): Publisher.App..ctor - WELCOME TO ARMA 3 PUBLISHER
    2021-11-23 12:00:44,930 [INFO] 1 (:0): Publisher.App..ctor - Version: 1.5.148470
    2021-11-23 12:01:50,532 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Current dir: C:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools
    2021-11-23 12:01:50,543 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Command line: "C:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools\Publisher\Publisher.exe"
    2021-11-23 12:01:50,543 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - OS Version: Microsoft Windows NT 6.2.9200.0
    2021-11-23 12:01:50,543 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - OS 64bit: True
    2021-11-23 12:01:50,543 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Process 64bit: False
    2021-11-23 12:01:50,544 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Personal dir: C:\Users\green\Documents
    2021-11-23 12:01:50,544 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Local App Data dir: C:\Users\green\AppData\Local
    2021-11-23 12:01:50,544 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Compatibility flags: -
    2021-11-23 12:01:50,568 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Render Capability - Tier: 2 (0x20000)
    2021-11-23 12:01:50,568 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Render Capability - Max Hardware Texture Size: 16384,16384
    2021-11-23 12:01:50,568 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Render Capability - PS 2.0 (DirectX 9): HW = True, SW = True
    2021-11-23 12:01:50,568 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Render Capability - PS 3.0 (DirectX 9c): HW = True, SW = False
    2021-11-23 12:01:50,568 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Render Capability - PS 4.0 (DirectX 10): HW = False, SW = False
    2021-11-23 12:01:50,569 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Render Capability - PS 4.1 (DirectX 10.1): HW = False, SW = False
    2021-11-23 12:01:50,569 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Render Capability - PS 5.0 (DirectX 11.0): HW = False, SW = False
    2021-11-23 12:01:50,570 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Visual C++ 2010 Runtime installed: True (version v10.0.40219.325)
    2021-11-23 12:01:50,571 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Visual C++ 2012 Runtime installed: True (version v11.0.61030.00, is from DevDiv: False)
    2021-11-23 12:01:50,571 [INFO] 1 (:0): SharedResources.ApplicationBase.LogSystemInformations - Visual C++ 2013 Runtime installed: True (version v12.0.21005.01, is from DevDiv: False)
    2021-11-23 12:01:50,571 [INFO] 1 (:0): Publisher.App..ctor - 
    2021-11-23 12:01:50,571 [INFO] 1 (:0): Publisher.App..ctor - 
    2021-11-23 12:01:50,571 [INFO] 1 (:0): Publisher.App..ctor - 
    2021-11-23 12:01:50,571 [INFO] 1 (:0): Publisher.App..ctor - WELCOME TO ARMA 3 PUBLISHER
    2021-11-23 12:01:50,572 [INFO] 1 (:0): Publisher.App..ctor - Version: 1.5.148470
    2021-11-23 12:01:54,993 [INFO] 4 (:0): SteamLayerWrap.SteamAPIWrap.Init - SteamAPIWrap::Init
    2021-11-23 12:01:55,017 [INFO] 5 (:0): Publisher.PublisherViewModel.HandleSteamInitialized - Steam initiated, status: SteamInitializationFailed
    2021-11-23 12:01:55,045 [FATAL] 1 (:0): SharedResources.ApplicationBase.CurrentDomain_UnhandledException - Caught unhandled exception:
    
    2021-11-23 12:01:55,047 [FATAL] 1 (:0): SharedResources.ApplicationBase.CurrentDomain_UnhandledException - System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
       at System.Windows.Media.Composition.DUCE.Channel.SyncFlush()
       at System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget, Nullable`1 channelSet)
       at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
    2021-11-23 12:01:55,051 [ERROR] 1 (:0): Publisher.App.HandleUnhandledException - System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
       at System.Windows.Media.Composition.DUCE.Channel.SyncFlush()
       at System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget, Nullable`1 channelSet)
       at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

     

     

     


  4. 7 hours ago, HereIsJones said:

    Noob question, what is the difference between this...

    
    _myTruck setVariable ["myTruck", 123];

    ...and this?

    
    _myTruck setVehicleVarName "MyTruck";
    "MyTruck" = _myTruck;

    Can both be used to do the same thing? If there's a decent writeup somewhere I'd love a pointer. Thanks!

    Hello! I can help you 😎 The difference between the two codes you have presented, is in the understanding of a variable, a script handle && the commands setVariable, publicVariable and missionNamespace .

     

    Lets use the examples provided to us by the Bohemia interactive wiki to fully explain the answer to the question you are trying to ask. We will create a truck with createVehicle , with a script handle of _myTruck, then define that script handle with a global scope variable . The purpose being, that your truck's global variable can be further acted upon with other scripts throughout the mission. I will then explain the syntax error in your examples.

     

    Example 3 from the createVehicle BIwiki:

    _myTruck = createVehicle ["B_Truck_01_mover_F", position player, [], 0, "FORM"];
    myTRUCK = _myTruck;
    publicVariable "myTRUCK";

    For the purposes of manipulating a created object in the short term, you should use publicVariable to redefine your local variable name (_myTruck) as the global variable name (myTruck).

    setVariable is more powerful of a command than publicVariable, as it is most often used in conjunction with missionNamespace. As such, you should use missionNamespace setVarible for persistent numerical based values. That can be referenced later, as true or false conditions for activating triggers, addActions and much more.

     

    Now for your examples. They return nil for your purposes because "myTruck" is the missionNamespace variable that is being defined as 123. However the local variable of _myTruck has no predefined variable of myTruck associated with it. If we used the following in the debug console to check the variable myTruck it would return "123". This is not what you need, to do what you want.

    missionNamespace getVariable "myTruck";

    Please ask all the questions. We are happy to help here on the forums.

    We will give you more working examples of how to use missionNamespace setVariable  to achieve more complex results, if your interested. Just let us know, Ciao!

    • Like 2
    • Thanks 1

  5. 1 hour ago, Reverend Andy said:

    I'm making an Eden mission where I have 3 compositions which I am going to place copies of each around the map, I want each type of composition to spawn a key feature for only one of the copies. 
    Ex. A flag randomly spawns in only one copy of a base and not the others.
    As far as randomizing item spawns I am currently using the "Object: present" slider but I'm open to any ideas on how to do that better as well. 
    1 Item is a prop, 1 is a unit, 1 is a vehicle. 

    I'm so sorry that this reads like a homework question but I've been smashing my head into the wall for a few days trying to get this to work and I can't seem to figure it out.
    Any help would be appreciated, thank you. 

    Hello, Welcome to the forums! I can help you😎 What you are trying to achieve can't be done 100% with only editor tools. You MUST use script to get your desired affect. I, of course, will give you instructions and an example script that you can copy/pasta into you mission file. Make sure to click the LINKS , they have all the information you need.

     

    You must create an array(3) of possible spawn locations, to choose a location at random for each of your objects spawn positions. Here is how:

     

    You have 3 different compositions and you will be placing multiples of each around the map. In each of your 3 compositions, add an invisible helipad in the exact position you wish your randomized object to spawn. Name each of these invisible helipads with a specific variable name that correlates to its respective composition. 

     

    Examples:

    -the first compositions invisible helipad is named  "CompositionA_1",

    -the second compositions invisible helipad is named  "CompositionB_1",

    -the third compositions invisible helipad is named "CompositionC_1".

     

    When you place multiples of variables that end in and underscore+number (EXAMPLE: CompositionA_1), for each copy of that object, the copy's variable name will be updated in a numerically sequential order (CompositionA_1,CompositionA_2,CompositionA_3....and so on).

     

    After you have placed all of your compositions on the map. Add all the variable names of the invisible helipads to 3 arrays (Example below), and use the command selectRandom. Then use the selectRandom array _handle in the position parameter of the createVehicle command to create your objects. Get all that!? 🤓 Don't worry. Here's the example you can copy/pasta into your missions init.sqf (or initServer.sqf)

     

    init.sqf (SinglePlayer) OR initServer.sqf (Multiplayer)

    _randomSpawnPos_1 = selectRandom [CompositionA_1, CompositionA_2, CompositionA_3];
    _object_1 = createVehicle ["<yourObjectClassname>", _randomSpawnPos_1, [], 0, "FORM"];
    
    _randomSpawnPos_2 = selectRandom [CompositionB_1, CompositionB_2, CompositionB_3];
    _object_2 = createVehicle ["<yourObjectClassname>", _randomSpawnPos_2, [], 0, "FORM"];
    
    _randomSpawnPos_3 = selectRandom [CompositionC_1, CompositionC_2, CompositionC_3];
    _object_3 = createVehicle ["<yourObjectClassname>", _randomSpawnPos_3, [], 0, "FORM"];

    Please ask all the questions. We are happy to help!

    • Like 1

  6. Hello everyone! I read a post by another user and felt the need to finally give back to the community. I give to you functional HEMTT Movers and SAM trailers. these 3 addActions allow players to tow and un-tow SAM trailers. Works on dedicated servers too! Semper Prorsum!

     

     Steam Workshop Demo Mission

     

    initPlayerLocal.sqf

    Spoiler
    
    Player addAction ["<t color='#FF0000'>TOW SAM Radar</t><img size='2' image='\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\use_ca'/>", 
    "
    	_target = (_this select 0);
    	_pVeh = vehicle _target;
    	_Rtrailer = nearestObject [_pVeh, 'B_Radar_System_01_F'];
    	[_pVeh,_Rtrailer] spawn {
    	_Veh = (_this select 0);
    	_radar = (_this select 1);
    	_radar allowDamage false; 
    	[_radar,[_Veh,[0.03,-6.9,1.01]]] remoteExec ['attachTo',0];
    	_radar setDir 0;
    	_radar setPosASL getPosASL _radar;
    	_radar enableSimulationGlobal true;
    	} remoteExec ['spawn',0];
    ",
    [],1,false,true,"",
    " 
    	_list = nearestObjects [_target,[], 15]; _hitched = attachedObjects vehicle _target; 
    	(typeOf vehicle player == 'B_Truck_01_mover_F') && ( {typeof _x isEqualTo 'B_Radar_System_01_F'} count _list >= 1) && ( count _hitched == 0)
    "
    ];
    
    Player addAction ["<t color='#0000FF'>TOW SAM Launcher</t><img size='2' image='\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\use_ca'/>", 
    "
    	_target = (_this select 0);
    	_pVeh = vehicle _target;
    	_Ltrailer = nearestObject [_pVeh, 'B_SAM_System_03_F'];
    	[_pVeh,_Ltrailer] spawn {
    	_Veh = (_this select 0);
    	_launcher = (_this select 1);
    	_launcher allowDamage false; 
    	[_launcher,[_Veh,[0.03,-7.3,1.95]]] remoteExec ['attachTo',0];
    	_launcher setDir 0;
    	_launcher setPosASL getPosASL _launcher;
    	_launcher enableSimulationGlobal true;
    	} remoteExec ['spawn',0];
    ",
    [],1,false,true,"",
    " 
    	_list = nearestObjects [_target,[], 15]; _hitched = attachedObjects vehicle _target; 
    	(typeOf vehicle player == 'B_Truck_01_mover_F') && ( {typeof _x isEqualTo 'B_SAM_System_03_F'} count _list >= 1) && ( count _hitched == 0)
    "
    ];
    
    Player addAction ["<t color='#00FF00'>Detatch Trailer</t><img size='2' image='\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\use_ca'/>", 
    "
    	_target = (_this select 0);
    	_pVeh = vehicle _target;
    	_pVeh spawn { {detach _x; _x setPos getPos _x; _x allowDamage true; _x enableSimulationGlobal true; } forEach attachedObjects _this; } remoteExec ['spawn',0];
    ",
    [],1,false,true,"",
    " 
    	_hitched = attachedObjects vehicle _target;
    	(typeOf vehicle player == 'B_Truck_01_mover_F') && ( count _hitched == 1)
    "
    ];

     

    Thank you Larrowpierremgi, and Davidoss . For me to be able to read someone's request for help and know what needs to be done before I even open notePad. Is all thanks to your tutelage. Both directly and indirectly through your extensive posts helping others.  I am in your debt, thank you.

    • Like 2
    • Thanks 2

  7. Hello! I have some insight on the issue and I would to share it with you. [0,0,0] is known as "Debug Corner". The default position param for all arma spawn functions is [0,0,0]. This includes waypoints as well. Explaining why units take off to the bottom left corner after unexpected behavior. I hope this bit of information helps. 


  8. Hello everyone! I feel that I must join this conversation as I need to raise and issue that should not be overlooked. I LOVE this DLC. However, all six tunnel systems are the same arrangement with only minor variations in the furniture. WHY? Every tunnel should have it's own unique arrangement to maximize the tunnels replay value. Anyone else agree? 

    • Like 1

  9. I love everything about the new DLC. HOWEVER, after taking screen shots and comparing the tunnels I found that they all have the same layout with only minor variations in the types and placement of furniture. WHY? What's the point of having 6 different , magnificent, tunnel systems if they are all the same!?  Each tunnel system should have a unique layout. So that mission makers (like myself) can randomize tunnel combat locations, utilize every square inch of Cam Lao Nam to it's fullest potential and give players the highest level of replay value possible. If the DEVS are reading this, PLEASE make each tunnel system unique in arrangement!!!

    • Like 1

  10. Hi everyone! I am swinging for the fences with my new mission. I am adding translations for all 9 supported languages in Arma. Everything is going well. However, as I developing my own systems and time tables for doing the translation work, I realize that my stringable.xml file is going to be Thousands on lines long with 20+ </Projects> and hundreds of </keys>. Can I and Should I try to sub-divide the file and call definitions with an #include "babel\translation_def_x.hpp" ? If this can be done, would someone please link me research material (BIwiki pages) and maybe even give me an example. something which I could modify for my own means. Please😁. I am way outside my comfort zone. Thank you! 


  11. 32 minutes ago, Kenziy sam said:

    mmmm I'm seeing that you're calling _this select 0. You're calling the first parameter of the class I guess, but I don't understand why the select 0 again. Is it because you want to call the array index of unit [] ?

    Hi. Yes, that is correct and that's the problem. either way it returns an error. _this select 0 returns error: type array expected object & _this select 0 select 0 returns error: type object expected array! I'm not doing this right.


  12. Hello everyone! I am here asking for help with an error I am getting from an eventhandler contained within a custom soldier class config.cpp file. This custom class is the project to make giant and miniature soldiers using setObjectScale. The error comes from a misidentification of a variable. Here is my config.cpp file. I used Drungo's config generator.

    config.cpp

    Spoiler
    
    class cfgPatches
    {
      class TWZ_Pym_Warriors
      {
        units[]={"TWZ_Twz_Pym_Little_F","TWZ_Twz_Pym_Big_F"};
        weapons[]={"TWZ_arifle_MX_RCO_pointer_snds_F_muzzle_snds_Hacc_pointer_IRoptic_Hamr","TWZ_hgun_P07_snds_F_muzzle_snds_L"};
        requiredVersion=0.1;
        requiredAddons[]={"A3_Weapons_F_Items","A3_Weapons_F","A3_Weapons_F_Rifles_MX","A3_Weapons_F_Pistols_P07","A3_Characters_F","CuratorOnly_Characters_F_BLUFOR"};
      };
    };
    
    class cfgFactionClasses
    {
      class TWZ_Pym_Warriors
      {
        icon="";
        displayName="Pym Warriors";
        side=1;
    	scope=2;
        priority=1;
      };
    };
    
    
    class cfgWeapons
    {
      class arifle_MX_RCO_pointer_snds_F;
      class hgun_P07_snds_F;
    
      class TWZ_arifle_MX_RCO_pointer_snds_F_muzzle_snds_Hacc_pointer_IRoptic_Hamr: arifle_MX_RCO_pointer_snds_F
      {
        displayName="MX 6.5 mm";
        scope=1;
        class LinkedItems
        {
          class LinkedItemsMuzzle
          {
            slot="MuzzleSlot";
            item="muzzle_snds_H";
          };
          class LinkedItemsOptic
          {
            slot="CowsSlot";
            item="optic_Hamr";
          };
          class LinkedItemsAcc
          {
            slot="PointerSlot";
            item="acc_pointer_IR";
          };
        };
      };
    
      class TWZ_hgun_P07_snds_F_muzzle_snds_L: hgun_P07_snds_F
      {
        displayName="P07 9 mm";
        scope=1;
        class LinkedItems
        {
          class LinkedItemsMuzzle
          {
            slot="MuzzleSlot";
            item="muzzle_snds_L";
          };
        };
      };
    
    };
    
    class cfgVehicles
    {
      class B_recon_TL_F;
    
      class TWZ_Twz_Pym_Little_F: B_recon_TL_F
      {
        faction="TWZ_Pym_Warriors";
        side=1;
    	scope=2;
        displayName="Twz Pym Little F";
        uniformClass="U_B_CombatUniform_mcam_vest";
        weapons[]={"Rangefinder","TWZ_arifle_MX_RCO_pointer_snds_F_muzzle_snds_Hacc_pointer_IRoptic_Hamr","TWZ_hgun_P07_snds_F_muzzle_snds_L","Put","Throw"};
        respawnWeapons[]={"Rangefinder","TWZ_arifle_MX_RCO_pointer_snds_F_muzzle_snds_Hacc_pointer_IRoptic_Hamr","TWZ_hgun_P07_snds_F_muzzle_snds_L","Put","Throw"};
        items[]={"FirstAidKit"};
        respawnItems[]={"FirstAidKit"};
        magazines[]={"30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","Chemlight_green","30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag_Tracer","30Rnd_65x39_caseless_mag_Tracer","16Rnd_9x21_Mag","MiniGrenade","MiniGrenade","SmokeShell","SmokeShellGreen","SmokeShellBlue","SmokeShellOrange","Chemlight_green"};
        respawnMagazines[]={"30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","Chemlight_green","30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag_Tracer","30Rnd_65x39_caseless_mag_Tracer","16Rnd_9x21_Mag","MiniGrenade","MiniGrenade","SmokeShell","SmokeShellGreen","SmokeShellBlue","SmokeShellOrange","Chemlight_green"};
        linkedItems[]={"ItemMap","ItemCompass","ItemWatch","ItemRadio","ItemGPS","NVGoggles","Rangefinder","H_MilCap_mcamo","V_Chestrig_rgr","G_Shades_Black","NVGoggles"};
        respawnLinkedItems[]={"ItemMap","ItemCompass","ItemWatch","ItemRadio","ItemGPS","NVGoggles","Rangefinder","H_MilCap_mcamo","V_Chestrig_rgr","G_Shades_Black","NVGoggles"};
        backpack="";
    	class EventHandlers
    	{
    	class TWZ_Pym_Warriors
    		{
    			init="_this spawn { while {true} do { [(_this select 0 select 0)] setObjectScale .35; }; };";
    		};
    	};
      };
    
      class TWZ_Twz_Pym_Big_F: B_recon_TL_F
      {
        faction="TWZ_Pym_Warriors";
        side=1;
    	scope=2;
        displayName="Twz Pym Big F";
        uniformClass="U_B_CombatUniform_mcam_vest";
        weapons[]={"Rangefinder","TWZ_arifle_MX_RCO_pointer_snds_F_muzzle_snds_Hacc_pointer_IRoptic_Hamr","TWZ_hgun_P07_snds_F_muzzle_snds_L","Put","Throw"};
        respawnWeapons[]={"Rangefinder","TWZ_arifle_MX_RCO_pointer_snds_F_muzzle_snds_Hacc_pointer_IRoptic_Hamr","TWZ_hgun_P07_snds_F_muzzle_snds_L","Put","Throw"};
        items[]={"FirstAidKit"};
        respawnItems[]={"FirstAidKit"};
        magazines[]={"30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","Chemlight_green","30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag_Tracer","30Rnd_65x39_caseless_mag_Tracer","16Rnd_9x21_Mag","MiniGrenade","MiniGrenade","SmokeShell","SmokeShellGreen","SmokeShellBlue","SmokeShellOrange","Chemlight_green"};
        respawnMagazines[]={"30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag","Chemlight_green","30Rnd_65x39_caseless_mag","30Rnd_65x39_caseless_mag_Tracer","30Rnd_65x39_caseless_mag_Tracer","16Rnd_9x21_Mag","MiniGrenade","MiniGrenade","SmokeShell","SmokeShellGreen","SmokeShellBlue","SmokeShellOrange","Chemlight_green"};
        linkedItems[]={"ItemMap","ItemCompass","ItemWatch","ItemRadio","ItemGPS","NVGoggles","Rangefinder","H_MilCap_mcamo","V_Chestrig_rgr","G_Shades_Black","NVGoggles"};
        respawnLinkedItems[]={"ItemMap","ItemCompass","ItemWatch","ItemRadio","ItemGPS","NVGoggles","Rangefinder","H_MilCap_mcamo","V_Chestrig_rgr","G_Shades_Black","NVGoggles"};
        backpack="";
    	class EventHandlers
    	{
    		class TWZ_Pym_Warriors
    		{
    			init="_this spawn { while {true} do { [(_this select 0 select 0)] setObjectScale .35; }; };";
    		};
    	};
      };
    
    };

    I have scripted myself into a corner here. in the following code

    
    class TWZ_Pym_Warriors
    		{
    			init="_this spawn { while {true} do { [(_this select 0 select 0)] setObjectScale .35; }; };";
    		};

     

     [(_this select 0)] returns an error: type array, expected object... .Please correct me here. I figured that the first variable in the TWZ_Pym_Warriors would be "units[]={"TWZ_Twz_Pym_Little_F","TWZ_Twz_Pym_Big_F"};"

    and when I flex the little knowledge I have of passing variable from scope to scope I add another "select 0" to identify the first variable, of the first variable in units. However, this returns the error: type object, expected array..... *facePalm*.

     

    I am obviously way off here. Would you please explain/show me how to Identify the variable of the body of the unit which I am attempting to execute the code upon.


  13. 12 hours ago, johnnyboy said:

    I love the Fantastic Voyage pic. What mod has the female in bathing suit?

     

    I didn't think of a constant loop resetting scale.  Is that expensive performance-wise I wonder?

     

    I'm trying a different approach where I attach scaled unit to an invisible normal unit, then control the scaled unit's animations.  Will be releasing something soon.

    Hi! The mod is ZEPHIK Female units. I want to try your approach when it's ready. Right now the loop works for set setObjectScale .4 and 10. Not a noticeable impact on performance. Main issue I have encountered is running as a gaint ( setObjectScale 10 ) , stubbing my tow on a wall or house and dying 🙂 pretty funny to watch.

    • Like 2

  14. On 3/3/2021 at 1:48 AM, Alert23 said:

    just tried this:

    put a man down and named him dude1
    in his init:

    
    [] spawn {
    	while {alive dude1} do {
    	dude1 setObjectScale 0.3;
    	};
    };

    and it seems like its working , atleast he is running and chasing me XD

     

    so funny he is ant man

    https://i.imgur.com/4qLoZCK.gifv

     

    so funny XD

      Reveal hidden contents

    CAQ72he.jpg

     

     

    Hi, Thank you! Sorry for the late reply, I have been super busy. When I get this up and functional I will add you to the credits of whatever I make with it. THANK YOU!

    • Haha 1

  15. Hi everyone! I have a good one for you all today. With the release of the art of war DLC, my mind was blown by the miniatures on display in the museum. I researched and found the wiki on setObjectScale . In the section entitled "Problem(s)" 😎 it reads

    Quote

    The Arma 3 LOD limits still apply, meaning walk-able surfaces can only be X m in size, and collision in general will only work up to X m from object center. This command works on all objects in Eden Editor or scenario preview, but it will not save and will reset when objects get moved. Eden Editor support is only intended for artists. Setting the scale of actively simulated objects (Vehicles with players/AI in them) is possible, but not officially supported, you may encounter issues.

    and again my mind is blown. setting the scale of simulated objects! OMG, Shrink-ray gun mod! and arma versions of old movies: Fantastic Voyage && Attack of the 50 Foot Woman && GODZILLA . But first HOW?!? How do we set the scale of a simulated object and what are the issues we are going to encounter? If my journey through arma has taught me anything, it's that in the absence of a direct solution, there is ALWAYS a work around. Let's have this discussion. Please, how do we do this and what are the issues we are going to encounter?

    Gunny, I shrank the Kids!

    A52416FB6C694781AF93CF0814BEC661617E8C92

    D55A287010D1129A11A23C87B84315422BC2EC58

    671455E1F16C9987242E9A1A693365F372972AC6

    C402CD4F7ECB49520F4EF98BF7293EC2B96056AD516F4136D5B58993F653AFCDBD35F71362046388

    • Like 2

  16. 31 minutes ago, Larrow said:

    Once you move the sector update the variable 'position' stored on it with its new position.

    
    _area = [_sector, "LocationArea_F", true] call bis_fnc_synchronizedObjects;
    _sector setVariable ["position",getPos _area];

    This is the variable used ('position') by spawnAISectorTatic FSM to send groups to the sectors position.

    Larrow, you are my hero! You have solved my problem. The answer was to move LocationArea_F along with the sector and then use the LocationArea_F's position in the updated sector variable of "Position".  Larrow,  your tutelage has given wheels to my imagination and It has taken me to places I never thought I could go. For this I am forever grateful. Thank you sir!

    • Like 1

  17. Hi everyone! I am making a dynamic AI vs AI king of the hill mission and I can't get the AI to capture the sector after it has been moved with setPos. I have programmed parameters to choose the size and location of the target area "sectorModule_F (TA_1)" . Everything is working as intended , script side. However, the spawned groups from the spawn AI modules don't move towards TA_1's new pos. They instead move towards TA_1's original editor placed position. I use setPos and setVariable "pos" to change TA_1's location. this is what I add to the sector modules init filed.

    Spoiler
    
    zoneSize = "TAsize_1" call BIS_fnc_getParamValue; 
    this setVariable ["objectarea", [zoneSize,zoneSize,0,false,0],true]; 
    sectorLoc = "TAlocation_1" call BIS_fnc_getParamValue;   
    switch (sectorLoc) do  
    { 
    case 1:{Npos = getMarkerPos "site_1"; this setPos Npos;this setVariable ["pos", Npos,true];}; 
    case 2:{Npos = getMarkerPos "site_2"; this setPos Npos;this setVariable ["pos", Npos,true];}; 
    case 3:{Npos = getMarkerPos "site_3"; this setPos Npos;this setVariable ["pos", Npos,true];};   
    };  

     

    This changes the zone size and location to one of 3 test positions. These test positions are logic markers placed in the editor. The zone changes size and location as intended. Players can cap the zone as normal.

     

    I need help with understanding the init order of the modules. It seems to me that the sectors location data is stored as a variable in one or more of the 4 sector control modules, as the mission initializes. However, I can't identify the specific variable outside the sectorModule_F that stores the area position so that I can change it with setVariable and make the spawned AI move towards the new sector Pos. Please help me. 

     

    I used "allVariables" command on the 4 module types that are present in the editor:

    ModuleMPTypeSectorControl_F,

    Spoiler
    
    ["bis_fnc_moduleexecute_activate","bis_fnc_moduleinit_iscuratorplaced","bis_fnc_moduleinit_status","bis_fnc_initmodules_activate","bis_fnc_initmodules_priroty","sides"]

     

    SectorModule_F,

    Spoiler
    
    ["taskowner","costwheeled","pos","bis_fnc_moduleexecute_activate","finalized","tasks","onownerchange","designation","costair","costwater","bis_fnc_moduleinit_iscuratorplaced","position","step","bis_fnc_moduleinit_status","defaultowner","ownerlimit","bis_fnc_initmodules_activate","owner","bis_fnc_initmodules_priroty","costtracked","sidescore","objectarea","costplayers","contested","areas","flags","area","scorereward","name","costinfantry","taskdescription","#var","triggers","sides","tasktitle","bis_fnc_addscriptedeventhandler_ownerchanged"]

     

    ModuleSpawnAI_F, &

    Spoiler
    
    ["infantry","sectorsand","groupsblu_f_motorized","b_g_soldier_lat_f","b_g_soldier_tl_f","b_g_soldier_a_f","b_t_soldier_lat_f","groupsblu_t_f_infantry","b_ctrg_soldier_tna_f","o_soldier_tl_f","o_medic_f","o_t_soldier_aaa_f","o_t_sniper_f","mechanized","bis_fnc_moduleexecute_activate","b_soldier_ar_f","b_recon_tl_f","groupsguerilla_mechanized","b_t_recon_jtac_f","groupsblu_t_f_motorized","groupsblu_ctrg_f_mechanized","b_w_soldier_lat_f","b_w_soldier_gl_f","b_w_soldier_at_f","o_heavygunner_f","o_t_soldier_ar_f","b_soldier_aaa_f","b_heavygunner_f","b_g_medic_f","b_t_soldier_a_f","b_t_soldier_lat2_f","o_soldier_aaa_f","o_recon_m_f","o_pathfinder_f","o_soldieru_gl_f","o_t_soldier_a_f","o_t_recon_f","bis_fnc_moduleinit_iscuratorplaced","usesectortactic","b_soldier_f","b_soldier_a_f","b_g_soldier_sl_f","b_g_soldier_m_f","b_t_soldier_aaa_f","b_gen_soldier_f","groupsgendarmerie_motorized","b_w_medic_f","groupsblu_w_f_infantry","o_soldier_sl_f","o_soldier_aa_f","o_t_soldier_hat_f","o_g_soldier_m_f","groups","b_soldier_gl_f","b_soldier_at_f","groupsblu_f_armored","b_t_soldier_f","b_t_sniper_f","groupsgendarmerie_infantry","b_w_soldier_aaa_f","o_sniper_f","o_t_medic_f","o_t_soldier_gl_f","o_t_soldier_at_f","bis_fnc_moduleinit_status","b_soldier_aar_f","b_t_soldier_m_f","b_t_soldier_tl_f","b_ctrg_soldier_m_tna_f","groupsblu_ctrg_f_infantry","b_w_soldier_f","o_soldier_a_f","o_soldier_aar_f","o_soldier_hat_f","o_soldieru_f","o_t_soldier_m_f","o_t_recon_medic_f","o_g_soldier_lat2_f","o_g_soldier_tl_f","expression","spawnrate","vehiclesingroup","bis_fnc_initmodules_activate","b_soldier_m_f","b_recon_m_f","b_soldier_lat2_f","b_g_soldier_ar_f","b_t_recon_tl_f","b_t_recon_f","groupsblu_t_f_mechanized","b_gen_commander_f","groupsgendarmerie_mechanized","groupsblu_w_f_motorized","o_soldier_ar_f","o_recon_medic_f","o_spotter_f","o_soldieru_a_f","o_t_soldier_f","o_t_soldier_aat_f","manpowercap","faction","bis_fnc_initmodules_priroty","activated","sectorsor","b_recon_medic_f","b_recon_jtac_f","b_recon_f","b_recon_sharpshooter_f","groupsguerilla_armored","b_t_recon_m_f","b_t_recon_medic_f","b_t_recon_lat_f","b_ctrg_soldier_jtac_tna_f","b_ctrg_soldier_lat2_tna_f","b_w_soldier_tl_f","b_w_soldier_a_f","o_t_recon_lat_f","o_t_recon_jtac_f","infantryingroup","b_soldier_aat_f","b_sharpshooter_f","b_g_soldier_f","b_t_soldier_sl_f","b_t_medic_f","b_t_soldier_aa_f","groupsblu_t_f_armored","groupsblu_w_f_mechanized","o_soldier_m_f","o_soldier_aat_f","o_soldieru_tl_f","o_g_soldier_sl_f","motorized","b_medic_f","b_recon_lat_f","b_g_soldier_gl_f","b_t_soldier_aat_f","b_ctrg_soldier_medic_tna_f","groupsblu_w_f_armored","o_soldier_gl_f","o_soldier_at_f","o_soldieru_m_f","o_t_recon_m_f","armored","initialized","spawnpoints","b_soldier_tl_f","b_spotter_f","groupsblu_f_infantry","b_t_recon_exp_f","b_ctrg_soldier_exp_tna_f","groupsgendarmerie_armored","b_w_soldier_sl_f","b_w_soldier_m_f","b_w_soldier_aat_f","b_w_soldier_aa_f","o_recon_lat_f","o_t_soldier_tl_f","o_t_recon_exp_f","o_g_soldier_f","side","groupsblu_f_mechanized","b_g_soldier_lat2_f","groupsguerilla_infantry","b_t_soldier_ar_f","b_t_spotter_f","b_ctrg_soldier_ar_tna_f","groupsblu_ctrg_f_motorized","o_recon_tl_f","o_soldieru_sl_f","o_soldieru_lat_f","o_soldieru_medic_f","o_t_recon_tl_f","o_t_soldier_ahat_f","o_g_soldier_ar_f","blacklistedgroups","b_recon_exp_f","groupsguerilla_motorized","b_ctrg_soldier_lat_tna_f","o_recon_jtac_f","o_soldier_ahat_f","o_t_soldier_lat_f","b_soldier_sl_f","b_soldier_aa_f","b_g_sharpshooter_f","b_ctrg_soldier_tl_tna_f","groupsblu_ctrg_f_armored","b_w_soldier_ar_f","o_recon_exp_f","o_recon_f","o_sharpshooter_f","o_t_soldier_sl_f","o_t_soldier_aa_f","o_t_spotter_f","o_g_medic_f","b_soldier_lat_f","b_sniper_f","b_t_soldier_gl_f","b_t_soldier_at_f","o_soldier_f","o_soldier_lat_f","o_soldieru_ar_f","o_g_soldier_gl_f"]

     

    ModuleSpawnAISectorTactic_F. 

    Spoiler
    
    ["bis_fnc_moduleexecute_activate","bis_fnc_moduleinit_iscuratorplaced","bis_fnc_moduleinit_status","bis_fnc_initmodules_activate","bis_fnc_initmodules_priroty"]

     

     Please, If anyone who is familiar with these modules and their variables could give me some advice and maybe even a solution I would really appreciate it. Thank you.

×