Jump to content

Piloto_Spyke

Member
  • Content Count

    23
  • Joined

  • Last visited

  • Medals

Posts posted by Piloto_Spyke


  1. torials I made while helping people in Arma Discord


    First Steps
    Video:

     

    Generic
    1. Actions and Hints -https://discord.com/channels/105462288051380224/976155351999201390/980360446110494761

    Spoiler

    ScriptSetup

    1. Create this folders: Scripts/Game/generated/UserAction/Modded.

    2. In Modded folder create ScriptedUserAction.c

    3. Inside this file put this:

    
    class myScriptedUserAction: ScriptedUserAction
    {        
        //------------------------------------------------------------------------------------------------
        override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity) 
        {
            Print("myAction_PerformAction");    
            SCR_HintManagerComponent.GetInstance().ShowCustomHint("My test ground world - DONE", "TEST GROUND", 3.0);    
        }
        
        //------------------------------------------------------------------------------------------------
        override bool CanBeShownScript(IEntity user)
        {    
            return true;
        }
        
        //------------------------------------------------------------------------------------------------
        override bool CanBePerformedScript(IEntity user)
        {
            return true;
        }
        
        //------------------------------------------------------------------------------------------------
        override bool HasLocalEffectOnlyScript()
        {
            return true;
        }    
    };

    World/EntitySetup
    1. If not present, add an ActionsManagerComponent (read wiky for minimum components present in order to work)

    2. Add one ActionContext

    3. In ActionContext, input some ContextName (myContext)

    4. In ActionContext, set Position to PointInfo and move up the Y offset (you will se the point moving in the world editor)

    5. Add one Additional Actions selecting your class inside ScriptedUserAction.c in my example myScriptedUserAction.

    6. In Aditional Actions/myScriptedUserAction add one parent context list and select the ContextName created before (myContext).

    7. In Aditional Actions/myScriptedUserAction Add UiInfo and input some Name to be shown.

    8. In Aditional Actions/myScriptedUserAction set visibility range to some value (2)

    9. In Aditional Actions/myScriptedUserAction set duration to some value (2)

    2. How to Kill object -https://discord.com/channels/105462288051380224/976155351999201390/995759928838996099

    Spoiler
    
    // Getting object with name myObject_0 from world.
    IEntity myEntity = GetGame().FindEntity("myObject_0");
    
    if(!myEntity)
      return;
    
    // Getting destruction component.
    SCR_DestructionMultiPhaseComponent component = SCR_DestructionMultiPhaseComponent.Cast(myEntity.FindComponent(SCR_DestructionMultiPhaseComponent));
            
    if(!component)
      return;
    
    // Killing entity    
    component.Kill();

     

    3. Delete Vehicle - https://discord.com/channels/105462288051380224/976155351999201390/995762975006785607

    Spoiler
    
    // Getting object with name BTR1 from world.
    IEntity myEntity2 = GetGame().FindEntity("BTR1");
    
    if(!myEntity2)
      return;
    
    // Deleting entity using SCR_EntityHelper.
    SCR_EntityHelper.DeleteEntityAndChildren(myEntity2);

     

    4. Get entities from world in area - https://discord.com/channels/105462288051380224/976155351999201390/1068605228653498398
    5. Make a custom config -https://discord.com/channels/105462288051380224/976155351999201390/1069333335672885299
    6. Hide item - https://discord.com/channels/105462288051380224/976155351999201390/1076409862101155850

    Spoiler
    
    IEntity myEntity = GetGame().FindEntity("helmet_0");
    Print(myEntity.GetPrefabData().GetPrefabName());
    ParametricMaterialInstanceComponent cloth = ParametricMaterialInstanceComponent.Cast(myEntity.FindComponent(ParametricMaterialInstanceComponent));
    if (!cloth)
        return;
    cloth.SetUserAlphaTestParam(255);
    // NOTE: Some items like helmet and his attached entities are hidden when changint from Third person to First person.

     

    7. Check if third person IsActive - https://discord.com/channels/105462288051380224/976155351999201390/1076470136632004618

    Spoiler
    
    // Option 1
    CharacterControllerComponent::IsInThirdPersonView
      
    // Option 2
    bool isThirdPerson(IEntity pUserEntity)
    {
        CameraHandlerComponent cameraHandler = CameraHandlerComponent.Cast(pUserEntity.FindComponent(CameraHandlerComponent));
        if (!cameraHandler)
            return false;
        return cameraHandler.IsInThirdPerson();
    }

     

    8. How to get attributes from a component not spawned yet.

    Spoiler
    
        static void GetPhysAttribitesFromItemResource(ResourceName resourceName, out float weight, out int sizeSetupStrategy, out vector itemDimensions, out float volume)
        {
            weight = 0.0;
            sizeSetupStrategy = 0.0;        
            itemDimensions = vector.Zero;
            volume = 0.0;
            
            IEntityComponentSource entComp = SCR_BaseContainerTools.FindComponentSource(Resource.Load(resourceName),InventoryItemComponent);
            if(!entComp)            
                return;
            BaseContainer baseContainerAttributes = entComp.GetObject("Attributes");    
            BaseContainer baseContainerPhysAttribites = baseContainerAttributes.GetObject("ItemPhysAttributes");        
            /*
            baseContainerPhysAttribites
            0 - Weight
            1 - SizeSetupStrategy
            2 - ItemDimensions
            3 - ItemVolume
            4 - DimensionScaler
            5 - RestingUP
            6 - RestingAdditiveRotationLS
            7 - PivotBoneName
            8 - RestingAdditiveOffsetLS
            9 - ActivePhysicalSimulation        
            
            
            for (int i; i < baseContainerPhysAttribites.GetNumVars(); i++)
            {
                PrintFormat("%1 - %2",i,baseContainerPhysAttribites.GetVarName(i));
            };
            */
            baseContainerPhysAttribites.Get("Weight",weight);
            baseContainerPhysAttribites.Get("SizeSetupStrategy",sizeSetupStrategy);
            baseContainerPhysAttribites.Get("ItemDimensions",itemDimensions);
            baseContainerPhysAttribites.Get("ItemVolume",volume);        
        }

     

    9. Send notification (local client)

    Spoiler
    
    SCR_PopUpNotification.GetInstance().PopupMsg(title,subtitle)

     

    10. How to use Virtual Arsenal (spawn only locally) functionality.

    Spoiler
    
    /*!
    This action will print all arsenal item's names and specifically M16 item name. Using Virtual Arsenal functionallity.
    Used as reference: SCR_InventoryOpenedStorageArsenalUI.c
    */
    class SPK_UserAction2 : ARU_ScriptedUserAction
    {
    	//------------------------------------------------------------------------------------------------
    	override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity) 
    	{
    		protected ref map<ResourceName, IEntity> cachedEntities = new map<ResourceName, IEntity>();
    		
    		// Getting SCR_ArsenalComponent allowed/filtered items.
    		SCR_ArsenalComponent arsenalComponent = SCR_ArsenalComponent.Cast(pOwnerEntity.FindComponent(SCR_ArsenalComponent));
    		if(!arsenalComponent)
    			return;
    		
    		array<ResourceName> prefabsToSpawn = new array<ResourceName>();
    		arsenalComponent.GetAvailablePrefabs(prefabsToSpawn);		
    		if(prefabsToSpawn.IsEmpty())
    			return;
    
    		// Creating VIRTUAL ENTITIES (spawning locally) while adding it to the map array.	
    		foreach (ResourceName resourceName: prefabsToSpawn)
    		{
    			cachedEntities.Insert(resourceName,SCR_VirtualArsenalCacheManager.GetInstance().RegisterResource(Resource.Load(resourceName)));
    		}
    		
    		// Using this items for any stuff we need
    		Print("Searching for all items: "+cachedEntities.Count().ToString());
    		foreach (ResourceName resourceName, IEntity entity: cachedEntities)
    		{
    			GetInventoryItemUIInfoName(entity);
    		}	
    		
    		// Getting an specific item name.		
    		ResourceName myResourceName = "{3E413771E1834D2F}Prefabs/Weapons/Rifles/M16/Rifle_M16A2.et";
    		Print("Searching for specific item: "+myResourceName);
    		IEntity ent = cachedEntities.Get(myResourceName);
    		if(ent)
    			GetInventoryItemUIInfoName(ent);
    	}
    	
    	//------------------------------------------------------------------------------------------------
    	string GetInventoryItemUIInfoName(IEntity ent)
    	{
    		string str = "";
    		if(!ent)
    			return str;
    		
    		InventoryItemComponent inventoryItemComponent = InventoryItemComponent.Cast(ent.FindComponent(InventoryItemComponent));
    		if(inventoryItemComponent)
    			str = inventoryItemComponent.GetUIInfo().GetName();
    		else
    			Print("No name: "+ent.GetPrefabData().GetPrefabName());
    		
    		Print(str);	
    		return str;	
    	}	
    };

     

     

    Edition

    1. Change default loadout loaded when spawning on world editor (useful for test purposes). Change it on the Loadout Manager prefab that should be present on the world map.

     

    Workbench
    1. Connecting Script Editor Debuger to PeerTool Client  - https://discord.com/channels/105462288051380224/105465701543723008/998630810913607760


    GUI
    1. First steps - Button and Hint - https://discord.com/channels/105462288051380224/976159778965438494/980534472372019250
    2. Lists - https://discord.com/channels/105462288051380224/976159778965438494/986701077846061066

     

    GUI - Game master
    1. Populating dropdown list getting the variables from a component placed in the edited entity (in his case the vehicle) - https://discord.com/channels/105462288051380224/976159778965438494/1030925491080802314
    2.  Add new waypoint to GM - https://discord.com/channels/105462288051380224/976159778965438494/1038538873283805325

     

    • Like 2

  2. Hi,

     

    I am trying to add a new functionality for a Spike launcher that we have in our mod.

    This functionality consists in that once the missile is launched you can control the point of impact manually (as seen in the video).

    For this I have created an invisible vehicle:

    Quote
    
    class cfgVehicles
    {
        class Car_F;
        class FFAA_InvisibleTargetVehicle_base_F: Car_F
        {
            displayName = "Invisible Vehicle Target";
            //model = "\A3\Structures_F\Training\InvisibleTarget_F.p3d";
            model = "\ffaa_spike_data\InvisibleTargetVehicle.p3d";
            side = 0;
            scope = 2;
            faction = "OPF_F";
        };
    };

     

     

    and this is the code that controls the missile (you can test it easily, in any mission with a Titan AT turret):

    Quote
    
    // V5
    
    SPK_sensitivity_1 = 0.6;
    SPK_MEM = false;
    
    _this addEventHandler ["Fired", {
        _this spawn {
            params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
    
            // camera setup
            _cam = "camera" camCreate (position _projectile);
            _cam camSetTarget [0,0,0];
            _cam cameraEffect ["internal", "BACK"];
            _cam attachTo [_projectile,[0,1,0]];
            _cam camSetFov 0.03; 
            _cam camCommit 0;
    
            // Objective setup
            _target = createVehicle ["FFAA_InvisibleTargetVehicle_base_F",[0,0,900],[],0,"CAN_COLLIDE"];
            _target allowDamage false; 
            _target setVehicleTIPars [1, 1, 1];         
    
            // DEBUG ------
            _dummy = createVehicle ["VR_3DSelector_01_default_F",[0,0,900],[],0,"CAN_COLLIDE"];
            _dummy attachTo [_target,[0,0,0]];
            // DEBUG ------
    
            // In case of a previous locked target
            _actualTarget = missileTarget _projectile;
            if(!isNull(_actualTarget))then{_target attachTo [_actualTarget,[0,0,0]];};
    
            // At the beginning we put the position of the objective to where the camera is looking.
            _target setPos (screenToWorld [0.5,0.5]); 
    
            // Management of the missile once fired ...
            while { alive _projectile } do {
    
                // Camera reset
                _cam camSetTarget _target;
                _cam camCommit 0;
    
                // Objective reset
                _projectile setMissileTarget _target;
    
                // Heading reset
                _target setDir (getDir _projectile);
                _sensitivity_aux = SPK_sensitivity_1;
                
                // Missile target movement
                /*             
                if (inputAction "TurnRight" > 0) then   {_target setPos (_target getRelPos [_sensitivity_aux, 90]);};
                if (inputAction "TurnLeft" > 0) then    {_target setPos (_target getRelPos [_sensitivity_aux, -90]);};
                if (inputAction "MoveForward" > 0) then {_target setPos (_target getRelPos [_sensitivity_aux, 180]);};
                if (inputAction "MoveBack" > 0) then    {_target setPos (_target getRelPos [_sensitivity_aux, 0]);};    
                */
    
                _sensitivity_aux = 0.01;
                if (inputAction "TurnRight" > 0) then   {_target setPos (screenToWorld [0.5+_sensitivity_aux,0.5]);};
                if (inputAction "TurnLeft" > 0) then    {_target setPos (screenToWorld [0.5-_sensitivity_aux,0.5]);};
                if (inputAction "MoveForward" > 0) then {_target setPos (screenToWorld [0.5,0.5+_sensitivity_aux]);};
                if (inputAction "MoveBack" > 0) then    {_target setPos (screenToWorld [0.5,0.5-_sensitivity_aux]);};    
                
    
                // Missile lock change
                if (inputAction "lockTarget" > 0 AND !SPK_MEM) then  {
                    SPK_MEM = true;
                    if !isNull(cursorTarget)then{
                        if(isNull attachedTo _target)then{
                            _target attachTo [cursorTarget,[0,0,0]];
                        }else{
                            detach _target;
                        };
                    };
                }else{
                    if(inputAction "lockTarget" == 0)then{
                        SPK_MEM = false;
                    };
                };
    
                systemChat format["SENS: %1",_sensitivity_aux];
    
                sleep 0.001;
            };
    
            // Finishing
            _cam cameraEffect ["terminate", "BACK"];
            camDestroy _cam;
            deleteVehicle _target;
            _gunner switchCamera "INTERNAL";
    
            // DEBUG ------
            deleteVehicle _dummy;
            // DEBUG ------
        };
    }];

     

     

     

    Problem:
    I don't know why the setPos doesn't behave as we expect in the hills. Even if we give it the order to go down, it always goes up in the same direction.

    Video to reproduce:

     

    How it works From 0:00 to 1:00
    Arma 3 1:00 to end

     

    Thx,

     

    Spyke.


  3. Hi, I will post this because i havent found so much info related to class compartmentsLights.
    I have been helped by reyhard on the Arma 3 Discord.


    - Requieres the "points" to be defined in the model.p3d Memory LOD.
    - Requires compartments defined for all:

    driverCompartments = Compartment1;
    cargoCompartments[] = {Compartment1};
    // and gunnerCompartments = "Compartment1"; in his respective turret class

    And this in myVehicle class:

    class compartmentsLights
    {
      class Comp1  // first class is asociated with Compartment1, second with Compartment2,....
      {
        class Light1
        {
          color[] = { 100,100,100 };
          ambient[] = { 100,100,100 };
          intensity = 0.1;
          size = 0;
          useFlare = 0;
          flareSize = 0;
          flareMaxDistance = 0;
          dayLight = 0;
          blinking = 0;
          class Attenuation
          {
            start = 0;
            constant = 0;
            linear = 1;
            quadratic = 70;
            hardLimitStart = 0.15;
            hardLimitEnd = 1.0;
          };
          point = "light_interior1";
        };
        class Light2 : Light1 
        {
          point = "light_interior4";
        };
    
        class Light3 : Light1 
        {
          color[] = { 300,0,0 };
          ambient[] = { 300,0,0 };
          point = "light_interior2";
          class Attenuation: Attenuation
          {
            start = 0;
            constant = 0;
            linear = 1;
            quadratic = 70;
            hardLimitStart = 0.5;
            hardLimitEnd = 1.5;
          };					
        };
        class Light4 : Light3 
        {					
          point = "light_interior3";
        };
      };
    };

     

    • Thanks 1

  4. Well finally with some help from the arma 3 discord (reyhard thx) this is what I have:

    This is the code for a FFV from a BMR600 (4 cargoTurrets with 2 hatches).
     

    Quote
    
    class CargoTurret_01 : CargoTurret	//(FFV) Firing From Vehicles
    {
      gunnerAction 				= "passenger_inside_6_Idle";	// When you are OUT
      gunnerInAction				= "passenger_apc_narrow_generic01";	// When you are IN		
      gunnerCompartments 			= "Compartment1";			/// gunner is able to switch gunner seats
      cargoCompartments			= "Compartment1";			/// gunner is able to switch cargo seats
      memoryPointsGetInGunner 	= "pos cargoTurret";		/// specific memory points to allow choice of position
      memoryPointsGetInGunnerDir	= "pos cargoTurret dir";	/// direction of get in action
      gunnerName 					= "Cargo Turret 1 (BL)";	/// name of the position in the Action menu
      proxyIndex 					= 5;					/// what cargo proxy is used according to index in the model
      maxElev 					= 50;					/// what is the highest possible elevation of the turret
      minElev 					= -15;					/// what is the lowest possible elevation of the turret
      maxTurn 					= 120;					/// what is the left-most possible turn of the turret
      minTurn 					= -120;					/// what is the right-most possible turn of the turret
      isPersonTurret 				= 1;					/// enables firing from vehicle functionality
      ejectDeadGunner 			= 0;					/// seatbelts included
      //enabledByAnimationSource 	= "hatchGunnerOffset_1";			/// doesn't work unless the said animation source is 1 (This doesn't work if the vehicle is inherits from CAR_F)
      animationSourceHatch 		= "hatchGunnerOffset_1";
      showAsCargo 				= true;		
      minOutElev=-15; maxOutElev=+80; initOutElev=0;
      minOutTurn=-90; maxOutTurn=+90; initOutTurn=0;
      maxHorizontalRotSpeed = 1.0; maxVerticalRotSpeed = 1.0;			
    };
    class CargoTurret_02 : CargoTurret_01
    {
      gunnerName = "Cargo Turret 2 (BR)";
      animationSourceHatch = "hatchGunnerOffset_2";
      proxyIndex = 6;
    };
    class CargoTurret_03 : CargoTurret_01
    {
      gunnerName = "Cargo Turret 3 (FL)";
      animationSourceHatch = "hatchGunnerOffset_3";
      proxyIndex = 7;
    };
    class CargoTurret_04 : CargoTurret_01
    {
      gunnerName = "Cargo Turret 4 (FR)";
      animationSourceHatch = "hatchGunnerOffset_4";
      proxyIndex = 8;
    };

     

    This requieres to create an animationSource
     

    Quote
    
    class AnimationSources
    {
    	// Turn 180º the player proxy
      class hatchGunnerOffset_1
      {
        source="user";
        animPeriod=0.5;
        initPhase=0;
      };
      class hatchGunnerOffset_2
      {
        source="user";
        animPeriod=0.5;
        initPhase=0;
      };
      class hatchGunnerOffset_3
      {
        source="user";
        animPeriod=0.5;
        initPhase=0;
      };
      class hatchGunnerOffset_4
      {
        source="user";
        animPeriod=0.5;
        initPhase=0;
      };
    	// Hatch Animations	
      class hatchtop1
      {
        source = "user";
        animPeriod = 0;
        initPhase = 0;
      };
      class hatchtop2
      {
        source = "user";
        animPeriod = 0;
        initPhase = 0;
      };	
    };

     

    An EventHandler to detect when the player is turnedOut and move the hatch and rotate the player to the correct direction
     

    Quote
    
    class EventHandlers: DefaultEventhandlers
    {
      class Ripper_BMR600_AnimationsFFV	// Este script controlará las animaciones de las escotillas (abrir/cerrar compuerta y Girar 180º el proxy)
      {
        init="_scr = _this execVM 'ripper_bmr600\scripts\fn_BMR_TurnOutFFV.sqf'";
      };
    };

     

    And this is the code (fn_BMR_TurnOutFFV.sqf):
     

    Quote
    
    params[["_veh",objNull]];
    
    if(isNull _veh)exitWith{};
    if !(isServer) exitWith {};
    
    while {alive _veh} do
    {   
        // Open/Close hatches
        if (isTurnedOut (_veh turretUnit [1]) || isTurnedOut (_veh turretUnit [2])) then {
            if (_veh animationPhase "hatchtop1" < 1) then {
                _veh animateSource ["hatchtop1",1];
            };
        } else {
            if ((_veh animationPhase "hatchtop1") > 0) then {
                _veh animateSource ["hatchtop1", 0];
            };
        };
        if (isTurnedOut (_veh turretUnit [3]) || isTurnedOut (_veh turretUnit [4])) then {
            if (_veh animationPhase "hatchtop2" < 1) then {
                _veh animateSource ["hatchtop2",1];
            };
        } else {
            if ((_veh animationPhase "hatchtop2") > 0) then {
                _veh animateSource ["hatchtop2", 0];
            };
        };
        
        // Rotate player
        if(isTurnedOut (_veh turretUnit [1]))then{_veh animateSource ["hatchGunnerOffset_1",1];}else{_veh animateSource ["hatchGunnerOffset_1",0];};
        if(isTurnedOut (_veh turretUnit [2]))then{_veh animateSource ["hatchGunnerOffset_2",1];}else{_veh animateSource ["hatchGunnerOffset_2",0];};
        if(isTurnedOut (_veh turretUnit [3]))then{_veh animateSource ["hatchGunnerOffset_3",1];}else{_veh animateSource ["hatchGunnerOffset_3",0];};
        if(isTurnedOut (_veh turretUnit [4]))then{_veh animateSource ["hatchGunnerOffset_4",1];}else{_veh animateSource ["hatchGunnerOffset_4",0];};
           
        sleep 0.5;
    };

     

    And this the model.cfg
     

    Quote
    
    class Animations
    {  
      class hatchGunnerOffset_1
      {
      type="rotationY";
      source="user";						// The controller that provides input above
      selection="cargoTurret_01";			// The name of the skeleton bone used.
      axis="cargoTurret_01_Axis";			// name of the axis in the model.
      memory = true;
      minValue = 0;
      maxValue = 1;
      angle0 = "(rad 0)";
      angle1 = "(rad 180)";	
      };
      class hatchGunnerOffset_2 : hatchGunnerOffset_1
      {
      selection="cargoTurret_02";
      axis="cargoTurret_02_Axis";
      };
      class hatchGunnerOffset_3 : hatchGunnerOffset_1
      {
      selection="cargoTurret_03";
      axis="cargoTurret_03_Axis";
      };		
      class hatchGunnerOffset_4 : hatchGunnerOffset_1
      {
      selection="cargoTurret_04";
      axis="cargoTurret_04_Axis";
      };  
      class hatchTop1
      {
      type="rotation";
      source="user";
      selection="hatchtop1";
      axis="hatchtop1_axis";
      animPeriod=0;
      minValue="0";
      maxValue="1";
      angle0="rad 0";
      angle1="rad -170";
      memory=1;
      };
      class hatchTop2: hatchTop1
      {
      selection="hatchtop2";
      axis="hatchtop2_axis";
      };
    };

     


    Hope this helps.

    • Like 2

  5. Hello

    I'm using the "CAR_F" from Arma 3 Samples to try to configure the FFV (Fire From Vehicle). More or less it works but it does not finish going as I want.

    I want you to not be able to shoot inside and have the same animation as the others who are sitting (Proxy.Cargo01.XX).

    Once you go out with the "turn in" I want it to stand up and be able to shoot as if you were out of the vehicle.

    Some references:
    MyTestAddonPbo: https://drive.google.com/drive/folders/1qv4Nbt2gfjcp5g31MHKcmNPY1pNiWM0m?usp=sharing
    Reference 1: https://community.bistudio.com/wiki/Arma_3_Cars_Config_Guidelines#Firing_from_vehicles
    Reference 2:

    Quote
    
    #include "basicdefines_A3.hpp"
    class DefaultEventhandlers;
    
    #include "CfgPatches.hpp"
    
    class WeaponFireGun;
    class WeaponCloudsGun;
    class WeaponFireMGun;
    class WeaponCloudsMGun;
    
    class CfgVehicles
    {
    	class Car;
    	class Car_F: Car
    	{
    		class HitPoints /// we want to use hitpoints predefined for all cars
    		{
    			class HitLFWheel;
    			class HitLF2Wheel;
    			class HitRFWheel;
    			class HitRF2Wheel;
    			class HitBody;
    			class HitGlass1;
    			class HitGlass2;
    			class HitGlass3;
    			class HitGlass4;
    		};
    		class EventHandlers;
    	};
    
    	class Car_F2: Car_F
    	{
    		class CargoTurret;
    		class ViewCargo;
    		class NewTurret;
    		class Turrets
    		{
    			class MainTurret: NewTurret
    			{
    				class ViewOptics;
    				class ViewGunner;
    				class Turrets
    				{
    					class CommanderOptics;
    				};
    			};
    		};
    
    	};
    
    	class Test_Car_01_base_F: Car_F2
    	{
    		model 	= "\Samples_f\Test_Car_01\Test_Car_01";  /// simple path to model
    		picture	= "\A3\Weapons_F\Data\placeholder_co.paa"; /// just some icon in command bar
    		Icon	= "\A3\Weapons_F\Data\placeholder_co.paa"; /// icon in map
    
    		displayName = "Test Car"; /// displayed in Editor
    
    		hiddenSelections[] = {"camo1"}; ///we want to allow changing the color of this selection
    
    		terrainCoef 	= 6.5; 	/// different surface affects this car more, stick to tarmac
    		turnCoef 		= 2.5; 	/// should match the wheel turn radius
    		precision 		= 10; 	/// how much freedom has the AI for its internal waypoints - lower number means more precise but slower approach to way
    		brakeDistance 	= 3.0; 	/// how many internal waypoints should the AI plan braking in advance
    		acceleration 	= 15; 	/// how fast acceleration does the AI think the car has
    
    		fireResistance 	= 5; 	/// lesser protection against fire than tanks
    		armor 			= 32; 	/// just some protection against missiles, collisions and explosions
    		cost			= 50000; /// how likely is the enemy going to target this vehicle
    
    		transportMaxBackpacks 	= 3; /// just some backpacks fit the trunk by default
    		transportSoldier 		= 3; /// number of cargo except driver
    
    		/// some values from parent class to show how to set them up
    		wheelDamageRadiusCoef 	= 0.9; 			/// for precision tweaking of damaged wheel size
    		wheelDestroyRadiusCoef 	= 0.4;			/// for tweaking of rims size to fit ground
    		maxFordingDepth 		= 0.5;			/// how high water would damage the engine of the car
    		waterResistance 		= 1;			/// if the depth of water is bigger than maxFordingDepth it starts to damage the engine after this time
    		crewCrashProtection		= 0.25;			/// multiplier of damage to crew of the vehicle => low number means better protection
    		driverLeftHandAnimName 	= "drivewheel"; /// according to what bone in model of car does hand move
    		driverRightHandAnimName = "drivewheel";	/// beware, non-existent bones may cause game crashes (even if the bones are hidden during play)
    
    		class TransportItems /// some first aid kits in trunk according to safety regulations
    		{
    			item_xx(FirstAidKit,4);
    		};
    
    		class HitPoints: HitPoints
    		{
    			class HitLFWheel: HitLFWheel	{armor=0.125; passThrough=0;}; /// it is easier to destroy wheels than hull of the vehicle
    			class HitLF2Wheel: HitLF2Wheel	{armor=0.125; passThrough=0;};
    
    			class HitRFWheel: HitRFWheel	{armor=0.125; passThrough=0;};
    			class HitRF2Wheel: HitRF2Wheel 	{armor=0.125; passThrough=0;};
    
    			class HitFuel 			{armor=0.50; material=-1; name="fueltank"; visual=""; passThrough=0.2;}; /// correct points for fuel tank, some of the damage is aFRLied to the whole
    			class HitEngine 		{armor=0.50; material=-1; name="engine"; visual=""; passThrough=0.2;};
    			class HitBody: HitBody 	{name = "body"; visual="camo1"; passThrough=1;}; /// all damage to the hull is aFRLied to total damage
    
    			class HitGlass1: HitGlass1 {armor=0.25;}; /// it is pretty easy to puncture the glass but not so easy to remove it
    			class HitGlass2: HitGlass2 {armor=0.25;};
    			class HitGlass3: HitGlass3 {armor=0.25;};
    			class HitGlass4: HitGlass4 {armor=0.25;};
    		};
    
    		driverAction 		= driver_offroad01; /// what action is going the driver take inside the vehicle. Non-existent action makes the vehicle inaccessible
    		cargoAction[] 		= {passenger_low01, passenger_generic01_leanleft, passenger_generic01_foldhands}; /// the same of all the crew
    		getInAction 		= GetInLow; 		/// how does driver look while getting in
    		getOutAction 		= GetOutLow; 		/// and out
    		cargoGetInAction[] 	= {"GetInLow"}; 	/// and the same for the rest, if the array has fewer members than the count of crew, the last one is used for the rest
    		cargoGetOutAction[] = {"GetOutLow"}; 	/// that means all use the same in this case
    
    		#include "sounds.hpp"	/// sounds are in a separate file to make this one simple
    		#include "pip.hpp"		/// PiPs are in a separate file to make this one simple
    		#include "physx.hpp"	/// PhysX settings are in a separate file to make this one simple
    
    		class PlayerSteeringCoefficients /// steering sensitivity configuration
    		{
    			 turnIncreaseConst 	= 0.3; // basic sensitivity value, higher value = faster steering
    			 turnIncreaseLinear = 1.0; // higher value means less sensitive steering in higher speed, more sensitive in lower speeds
    			 turnIncreaseTime 	= 1.0; // higher value means smoother steering around the center and more sensitive when the actual steering angle gets closer to the max. steering angle
    
    			 turnDecreaseConst 	= 5.0; // basic caster effect value, higher value = the faster the wheels align in the direction of travel
    			 turnDecreaseLinear = 3.0; // higher value means faster wheel re-centering in higher speed, slower in lower speeds
    			 turnDecreaseTime 	= 0.0; // higher value means stronger caster effect at the max. steering angle and weaker once the wheels are closer to centered position
    
    			 maxTurnHundred 	= 0.7; // coefficient of the maximum turning angle @ 100km/h; limit goes linearly to the default max. turn. angle @ 0km/h
    		};
    
    		/// memory points where do tracks of the wheel appear
    		// front left track, left offset
    		memoryPointTrackFLL = "TrackFLL";
    		// front left track, right offset
    		memoryPointTrackFLR = "TrackFLR";
    		// back left track, left offset
    		memoryPointTrackBLL = "TrackBLL";
    		// back left track, right offset
    		memoryPointTrackBLR = "TrackBLR";
    		// front right track, left offset
    		memoryPointTrackFRL = "TrackFRL";
    		// front right track, right offset
    		memoryPointTrackFRR = "TrackFRR";
    		// back right track, left offset
    		memoryPointTrackBRL = "TrackBRL";
    		// back right track, right offset
    		memoryPointTrackBRR = "TrackBRR";
    
    		class Damage /// damage changes material in specific places (visual in hitPoint)
    		{
    			tex[]={};
    			mat[]=
    			{
    				"A3\data_f\glass_veh_int.rvmat", 		/// material mapped in model
    				"A3\data_f\Glass_veh_damage.rvmat", 	/// changes to this one once damage of the part reaches 0.5
    				"A3\data_f\Glass_veh_damage.rvmat",		/// changes to this one once damage of the part reaches 1
    
    				"A3\data_f\glass_veh.rvmat",			/// another material
    				"A3\data_f\Glass_veh_damage.rvmat",		/// changes into different ones
    				"A3\data_f\Glass_veh_damage.rvmat"
    			};
    		};
    
    		class Exhausts /// specific exhaust effects for the car
    		{
    			class Exhaust1 /// the car has two exhausts - each on one side
    			{
    				position 	= "exhaust";  		/// name of initial memory point
    				direction 	= "exhaust_dir";	/// name of memory point for exhaust direction
    				effect 		= "ExhaustsEffect";	/// what particle effect is it going to use
    			};
    
    			class Exhaust2
    			{
    				position 	= "exhaust2_pos";
    				direction 	= "exhaust2_dir";
    				effect 		= "ExhaustsEffect";
    			};
    		};
    
    		class Reflectors	/// only front lights are considered to be reflectors to save CPU
    		{
    			class LightCarHeadL01 	/// lights on each side consist of two bulbs with different flares
    			{
    				color[] 		= {1900, 1800, 1700};		/// approximate colour of standard lights
    				ambient[]		= {5, 5, 5};				/// nearly a white one
    				position 		= "LightCarHeadL01";		/// memory point for start of the light and flare
    				direction 		= "LightCarHeadL01_end";	/// memory point for the light direction
    				hitpoint 		= "Light_L";				/// point(s) in hitpoint lod for the light (hitPoints are created by engine)
    				selection 		= "Light_L";				/// selection for artificial glow around the bulb, not much used any more
    				size 			= 1;						/// size of the light point seen from distance
    				innerAngle 		= 100;						/// angle of full light
    				outerAngle 		= 179;						/// angle of some light
    				coneFadeCoef 	= 10;						/// attenuation of light between the above angles
    				intensity 		= 1;						/// strength of the light
    				useFlare 		= true;						/// does the light use flare?
    				dayLight 		= false;					/// switching light off during day saves CPU a lot
    				flareSize 		= 1.0;						/// how big is the flare
    
    				class Attenuation
    				{
    					start 			= 1.0;
    					constant 		= 0;
    					linear 			= 0;
    					quadratic 		= 0.25;
    					hardLimitStart 	= 30;		/// it is good to have some limit otherwise the light would shine to infinite distance
    					hardLimitEnd 	= 60;		/// this allows adding more lights into scene
    				};
    			};
    
    			class LightCarHeadL02: LightCarHeadL01
    			{
    				position 	= "LightCarHeadL02";
    				direction 	= "LightCarHeadL02_end";
    				FlareSize 	= 0.5;						/// side bulbs aren't that strong
    			};
    
    			class LightCarHeadR01: LightCarHeadL01
    			{
    				position 	= "LightCarHeadR01";
    				direction 	= "LightCarHeadR01_end";
    				hitpoint 	= "Light_R";
    				selection 	= "Light_R";
    			};
    
    			class LightCarHeadR02: LightCarHeadR01
    			{
    				position 	= "LightCarHeadR02";
    				direction 	= "LightCarHeadR02_end";
    				FlareSize 	= 0.5;
    			};
    		};
    
    		aggregateReflectors[] = {{"LightCarHeadL01", "LightCarHeadL02"}, {"LightCarHeadR01", "LightCarHeadR02"}}; /// aggregating reflectors helps the engine a lot
    		/// it might be even good to aggregate all lights into one source as it is done for most of the cars
    
    		class EventHandlers: EventHandlers
    		{
    			// (_this select 0): the vehicle
    			// """" Random texture source (pick one from the property textureList[])
    			// []: randomize the animation sources (accordingly to the property animationList[])
    			// false: Don't change the mass even if an animation source has a defined mass
    			init="if (local (_this select 0)) then {[(_this select 0), """", [], false] call bis_fnc_initVehicle;};";
    		};
    
    		// Must be kept as fail-safe in case of issue with the function
    		hiddenSelectionsTextures[]={"\A3\Weapons_F\Data\placeholder_co.paa"};	 /// we could use any texture to cover the car
    
    		// Definition of texture sources (skins), used for the VhC (Vehicle customization)
    		// Also, because the Garage uses the VhC, it will make them available from the garage
    		class textureSources
    		{
    			class red // Source class
    			{
    				displayName="Red"; // name displayed, among other, from the garage
    				author=$STR_A3_Bohemia_Interactive; // Author of the skin
    				textures[]=// List of textures, in the same order as the hiddenSelections definition
    				{
    					"#(rgb,8,8,3)color(1,0,0,1)" // This is procedural texture, can be useful to set placeholder
    				};
    				factions[]=// This source should be available only for these factions
    				{
    					"OPF_F", "OPF_G_F" // Side Opfor
    				};
    			};
    			class blue
    			{
    				displayName="BBBBLue";
    				author=$STR_A3_Bohemia_Interactive;
    				textures[]=
    				{
    					"#(rgb,8,8,3)color(0,0,1,1)"
    				};
    				factions[]=
    				{
    					"BLU_F", "BLU_G_F" // Side Blufor
    				};
    			};
    			class green
    			{
    				displayName="Green";
    				author=$STR_A3_Bohemia_Interactive;
    				textures[]=
    				{
    					"#(rgb,8,8,3)color(0,1,0,1)"
    				};
    				factions[]=
    				{
    					"IND_F", "IND_G_F" // Side independent
    				};
    			};
    			class yellow
    			{
    				displayName="Yellow power";
    				author=$STR_A3_Bohemia_Interactive;
    				textures[]=
    				{
    					"#(rgb,8,8,3)color(0,1,0,1)"
    				};
    				factions[]=
    				{
    					// Guerilla only
    					"BLU_G_F",
    					"OPF_G_F",
    					"IND_G_F"
    				};
    			};
    			class white
    			{
    				displayName="White is white";
    				author="Another name";
    				textures[]=
    				{
    					"#(rgb,8,8,3)color(1,1,1,1)"
    				};
    				factions[]=
    				{
    					"CIV_F" // side civilian
    				};
    			};
    			class black
    			{
    				displayName="Dark side";
    				author="Tom_48_97";
    				textures[]=
    				{
    					"#(rgb,8,8,3)color(0,0,0,1)"
    				};
    				factions[]= {}; // Should be available for every factions
    			};
    		};
    		// [_textureSourceClass1, _probability1, _textureSourceClass2, _probability2, ...]
    		// Default behavior of the VhC is to select one of these sources, with a weighted random
    		textureList[]=
    		{
    			"red", 1,
    			"green", __EVAL(1/3), // You can also use EVAL to evaluate an expression
    			"blue", 1,
    			"black", 1
    			// You can noticed that the white source is missing, therefore, it won't be part of the random
    		};
    
    		class MFD /// Clocks on the car board
    		{
    			class ClockHUD
    			{
    				#include "cfgHUD.hpp"
    			};
    		};
    
    
    		class Turrets: Turrets
    		{
    			class CargoTurret_01 : CargoTurret	//(FFV) Firing From Vehicles
    			{
    				class ViewGunner : ViewCargo {};  //should fix the arseview, hopefully
    				gunnerAction = "vehicle_turnout_2";
    				memoryPointsGetInGunner = "pos cargo L";
    				memoryPointsGetInGunnerDir = "pos cargo L dir";
    				gunnerName = $STR_A3_TURRETS_CARGOTURRET_R2;
    				gunnerCompartments = Compartment1;
    				proxyIndex = 4;
    				isPersonTurret = 1; // this turret is able to fire both when turned in and out				
    				gunnerGetInAction = "GetInHigh";
    				gunnerGetOutAction = "GetOutHigh";
    				canHideGunner = 1;
    				gunnerInAction = "passenger_apc_generic02";
    				enabledByAnimationSource = "left_gunner_move";
    				inGunnerMayFire = 0;
    				outGunnerMayFire = 1;
    				LODTurnedIn = VIEW_DEFAULT_LOD;
    				LODTurnedOut = VIEW_DEFAULT_LOD;
    
    				// Old view limits inbounce
    				maxElev = 45;	// vertical limit for field of view
    				minElev = -5;	// vertical limit for field of view
    				maxTurn = 95;	// horizontal limit for field of view
    				minTurn = -95;	// horizontal limit for field of view
    				
    				class dynamicViewLimits	// additional limits according to filled positions
    				{
    					CargoTurret_02[] = { -65, 95 };	// if CargoTurret_02 is filled, this turret cannot turn that much to negative way (limits from -95 to -65 degrees)
    				};
    
    				/// New view limits inbounce
    				class TurnIn /// limits for gunner turned in
    				{
    					limitsArrayTop[] = { {33.8208, -93.9616}, {40.8906, 66.5705} };	// points for the upper curve
    					limitsArrayBottom[] = { {-9.4643, -94.5753}, {-8.3683, -67.6867}, {-9.7173, 43.6372}, {-10.1082, 78.9166} }; /// points for the lower curve
    				};
    				class TurnOut : TurnIn {}; /// turn out uses the same limits as turn in this time				
    			};
    		};
    	};
    
    	// Derivate from the base class
    	class C_Test_Car_01_F: Test_Car_01_base_F /// some class that is going to be visible in editor
    	{
    		scope	= 2; 			/// makes the car visible in editor
    		scopeCurator=2;			// scope 2 means it's available in Zeus mode (0 means hidden)
    		crew 	= "C_man_1"; 	/// we need someone to fit into the car
    		side	= 3; 			/// civilian car should be on civilian side
    		faction	= CIV_F;		/// and with civilian faction
    	};
    
    };

     

     

    Thx for your help,
    Spyke


  6. Hello,
    I open this thread so that people who search for it on the Internet can find it easier than I do.

    I have solved this with the help of the people who were in the Slack of the ACE (special mention to Schwaggot).
     

    1. It have to be executed from an Addon (or at least it is the only way it worked for me)
    2. Code executed from my addon config.cpp

    class ace_medical_treatment_actions {
    		class Diagnose;
            class ExecuteMyCode: Diagnose {
                displayName = "EXECUTE MY CODE";
    			displayNameProgress = "EXECUTE MY CODE";
                items[] = {};
                category = "examine";
                allowedSelections[] = {"All"};
                allowSelfTreatment = 1;
                treatmentTime = 3;
                callbackSuccess = "true";
                callbackFailure = "";
                callbackProgress = "";
    			condition = "true";
                itemConsumed = 0;
                litter[] = {};
    		};
    };

    Spyke.

    • Like 2

  7. Hi, maybe this could be useful.

    init.sqf

    [] execVM "initSaveLoadouts.sqf";



    initSaveLoadouts.sqf

    diag_log "initSaveLoadouts.sqf";
    
    SPK_fnc_applyClient = {
    	params ["_loadout", "_positionASL", "_dir"];
        player setUnitLoadout _loadout;
        player setDir _dir;
        player setPosASL _positionASL;
        diag_log "(ClientData Load in client)";
    };
    
    
    SPK_fnc_resetClientData = {
    	params["_uid"];
    	profileNamespace setVariable [format["Name_%1",_uid], nil];
    	profileNamespace setVariable [format["Loadout_%1",_uid], nil];
    	profileNamespace setVariable [format["Position_%1",_uid], nil];
    	profileNamespace setVariable [format["Direction_%1",_uid], nil];
    };
    
    
    SPK_fnc_saveClientData = {
    	params["_unit","_uid","_name"];
    	profileNamespace setVariable [format["Name_%1",_uid], _name];
    	profileNamespace setVariable [format["Loadout_%1",_uid], getUnitLoadout _unit];
    	profileNamespace setVariable [format["Position_%1",_uid], getPos _unit];
    	profileNamespace setVariable [format["Direction_%1",_uid], getDir _unit];
    	saveprofileNamespace;
    	diag_log format ["(ClientData Save) - ID: %1 | Name: %2 | Saved",_uid, _name];
    };
    
    
    SPK_fnc_loadClientData = {
    	params["_uid","_name"];
    
    	_nameId = profileNamespace getVariable [format["Name_%1",_uid], ""];
    	_loadout = profileNamespace getVariable [format["Loadout_%1",_uid], []];
    	_position = profileNamespace getVariable [format["Position_%1",_uid], [0,0,0]];
    	_direction = profileNamespace getVariable [format["Direction_%1",_uid], 0];
    	diag_log format ["(ClientData Load) - ID: %1 | Name: %2 | Loaded",_uid, _name];
    	[_nameId,_loadout,_position,_direction]
    };
    
    
    
    // Si esto se ejecuta en un servidor ...
    if(isServer) then {
    	
    	addMissionEventHandler [
    		"HandleDisconnect", 
    		{
    			params ["_unit", "_id", "_uid", "_name"];
    			
    			// Si la unidad existe ...
    			if(!isNull _unit) then {	
    
    				// Guardamos la información del cliente				
    				[_unit,_uid,_name] spawn SPK_fnc_saveClientData;				
    			};
    			false
    		}
    	];
    	
    
    	addMissionEventHandler [
    		"PlayerConnected", 
    		{
    			params ["_id", "_uid", "_name", "_jip", "_owner"];
    
    			// Si es un jugador en Join In Progres (JIP) ...
    			if(_jip) then {
    				
    				// Cargamos la información que hemos guardado del cliente
    				_loaded = [_uid,_name] spawn SPK_fnc_loadClientData;
    				_loaded params ["_nameId","_loadout","_position","_direction"];
    
    				// Si no tenemos nada guardado de este cliente, no hacemos nada (EXIT).
    				if(_nameId == "")exitWith{diag_log format ["Player %1 - Without saved data",_name]};
    
    				// Aplicamos el loadout, posición y dirección al jugador
    				[_loadout,_position,_direction] remoteExec ["SPK_fnc_applyClient", _owner]; 				
    			};
    		}
    	];	
    };


    CONCLUSION after trying it:
    If you want to save variables:
    - It cannot be saved on the server unless a database is used.
    - They must be saved in the player's own profile with the profileNamespace or saveProfileNamespace commands.

    Therefore the scrip that I have put above does not serve to save remanent data.

    Spyke


  8. hi,
    I think there is no way to get variables or loadouts remaining after the mission has been terminated / canceled / aborted.
    The code you show works as long as the mission doesn't finish.

    Edit:
    I found this, maybe it works for you:

    profileNamespace --> To save it to the server
    saveProfileNamespace --> To make the data remain?

    I have never used them so I cannot help you much in how they work.

    Spyke.


  9. Hello, I am trying to make a TreeView dialog that allows me to select units (in fact what I would like is exactly the same treeView of the Eden Editor) and I have been making filters and using the configClasses but I just did not like the result. Anyone know how I could get something like that?

    I'm using this to filter, but it doesn't seem to be a good approach I think, because some strange units still appear

     

    fn_load.sqf

    _cntrlTree = (findDisplay 1500) displayCtrl 0;
    
    _ManList = ("configName _x isKindOf 'Man' AND configName _x isKindOf 'SoldierWB' AND (getText (_x >> 'faction')=='BLU_F') AND (getText(_x >> 'editorSubcategory')=='EdSubcat_Personnel')" configClasses (configFile / "CfgVehicles"));
    
    {
        _text = getText(configFile >> "CfgVehicles" >> configName _x >> "displayName");
        _text0 = getText(configFile >> "CfgVehicles" >> configName _x >> "editorSubcategory");
        _cntrlTree tvAdd [[],_text];
        _cntrlTree tvSetTooltip [[_forEachIndex], configName _x];
    } forEach _ManList;
    
    _cntrlTree tvSort [[], false];

    The following is in case someone serves as I am doing the treeVIew, although to solve the problem it may not be necessary.

    Quote

    MainGUI.hpp

    
    class A3UDMG_main
    {
    
    	idd=1500;
    	movingEnable = false;
    	enableSimulation = true;
    	fadein=0;
    	duration = 1e+011;
    	fadeout=0;
    	onLoad = "params ['_displayorcontrol']; [_displayorcontrol] spawn A3U_DMG_ui_fnc_load;";
    
    	controlsBackground[]={};
    	objects[]={};
    	class Controls
    	{
    		class RSC_Tree_0: RscTree
    		{
    			idc = 0;
    			text = "" //--- ToDo: Localize;
    			x = 0;
    			y = 0;
    			w = 0.4;
    			h = 1;
    			colorBackground[] = {0,0,0,0.5};
    			onTreeSelChanged = "params ['_control', '_selectionPath']; [_control,_selectionPath] spawn A3U_DMG_ui_fnc_Change;";
    		}
    		class RscPicture_130: RscPicture
    		{
    			idc = 130;
    			text = "";
    			x = 0.5;
    			y = 0;
    			w = 0.15 * safezoneW;
    			h = 0.15 * safezoneH;
    		};
    	};
    };

    fn_Change.sqf

    
    params ["_control", "_selectionPath"];	
    
    _display = ctrlParent _control;
    
    _className = _control tvTooltip _selectionPath;
    _imagePath = getText (configfile >> "CfgVehicles" >> _className >> "editorPreview");
    _display displayCtrl (130) ctrlSetText _imagePath;




    Thanks for the help.


  10. Hi, I just want to open this post for people who want to test with the New Rewrite of ACE Medical.

    It is a very simple script that can help you understand the states in which the new medical system alternates.

    I hope you find it useful.

    init.sqf

    
    addMissionEventHandler ["Draw3D", {
    	{
    	  _unit = _x;
    		if (!(isNil "_unit") AND ((side _unit) == west OR (side _unit) == civilian))then{
    			_pos = ASLToAGL getPosASL _unit;
    			_headPos = [_pos select 0, _pos select 1, (_pos select 2) + 1.2];
    
    			_heartRate = _unit getVariable ["ace_medical_heartrate", 00];
    			_bloodPressure = _unit getVariable ["ace_medical_bloodpressure", [00,00]];
    			_bloodVolume = _unit getVariable ["ace_medical_bloodvolume", 00];
    
    			_Text = format ["HR: %1 | BP: %2 | BV: %3",_heartRate toFixed 1,_bloodPressure,_bloodVolume toFixed 1];
    
    			drawIcon3D ["", [1, 1, 1,1], _headPos, 0, 0, 0, _Text, 2, 0.03, "PuristaBold"];
    
    
    			_headPos = [_pos select 0, _pos select 1, (_pos select 2) + 0.5];
    
    			_state = _unit getVariable ["cba_statemachine_state0",""];
    			_text = "";
    			if(_state == "cardiacarrest")then{
    				_text = format["cardiacarrest (%1 s)", (_unit getVariable ["ace_medical_statemachine_cardiacarresttimeleft",0]) toFixed 1];
    			}else{
    				_text = _state;
    			};
    			drawIcon3D ["", [0.1, 0.45, 1,1], _headPos, 0, 0, 0, _text , 2, 0.03, "PuristaBold"];
    		};
    	} forEach allUnits;
    }];
    

    Spyke

    • Like 2
    • Thanks 2

  11. Hello, I also got the same error and I have managed to solve it

     

    ERROR:

    55 cutRsc ["", "PLAIN", - 1, false];

    which seems to be not a possible combination.
     

    Solution:
    Option 1: Delete it (in my case it is not entirely necessary).
    Option 2: Create an RSCDefault (as Killzone_Kid says in the notes below this link: https://community.bistudio.com/wiki/cutRsc)
     

    class RscTitles { 
    	class Default { 
    		idd = -1; 
    		fadein = 0; 
    		fadeout = 0; 
    		duration = 0; 
    	}; 
    };

    in your code:

    55 cutRsc ["Default", "PLAIN"];


    Hope it helps.
    Spyke.


  12. Hello,
    I am trying to use the "Key Frame Animation" to make a little cinematic but I have a doubt that I have not found anywhere.
     

    Context:
    I already have all the modules of the "Key Frame Animation" ready and the camera moves well with the modes: Animation, Move, Nothing.
     

    Question:
    How should the objective to look at be introduced? I understand that it goes in the Rich Curve module, Look input. But I just didn't understand its syntax.

    The description says: <EdenId, TargetObject>
    As default: [-1, <NULL-object>]

    If I have an object called Target_0 which is what I want to look with the camera, what should I do?
     

    Thanks in advance.
    Spyke


  13. Hi everyone,

    I'm trying to make a script that allows you to cancel a mission by clicking on a text that says CANCEL in the description of the task.

    Script:
    _descript1 = "<execute expression=' [1] call compilefinal preprocessFileLineNumbers'DMG\functions\fn_CancelM.sqf' '>CANCEL</execute>"; 

    And then in the task:

    [blufor, ["Tarea_"+_IDTarea], [_descript1,_titulo,_marker], _posicion, true, 1, true] call BIS_fnc_taskCreate;

     

    If I put it in this way the result is that nothing comes out.

     

    Thanks for your help

    Spyke

     

    is my first post in this forum, if I do not have to say it here please tell me.
    I found it here: 

×