Jump to content

joemac90

Member
  • Content Count

    62
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by joemac90


  1. You could try this, it deletes the entity on the server and can be called by the owner entity itself to delete it:

    // Note: The entity needs an RPL component, m_Owner is the entity to be deleted.
    
    SCR_EntityHelper.DeleteEntityAndChildren( m_Owner );
    or 
    SCR_EntityHelper.DeleteChildren( m_Owner );

     

    • Like 1

  2. I am no expert but have been trying to do similar things, here are some things I have learnt so far:

    Checkout:

    1) Action scripts:  https://community.bistudio.com/wiki/Arma_Reforger:Action_Context_Setup

    2) In the workbench script editor search for UserActions, there are lots of examples. TestPushUserAction : PerformAction uses the SCR_InteractableBoxComponent

    2)  Add SCR_InteractableBoxComponent to your prefab, which can be used to do more complex actions and events but you could just use a simple action script

    You can find it from the action script using this code:

    GenericEntity genEnt = GenericEntity.Cast(pOwnerEntity);
    AM_InteractableBoxComponent boxComponent = AM_InteractableBoxComponent.Cast(genEnt.FindComponent(AM_InteractableBoxComponent));
    			
    if (boxComponent)
    {
    	boxComponent.CancelDragAction();
    }

     

    3) You can view the script for each component by right clicking on it
     

    4) You can spawn a new entity also with this code, disclaimer I am not sure about the rpl stuff,  still learning at the moment?:

    	//------------------------------------------------------------------------------------------------
    	private void SpawnEntity( string entityString )
    	{
    		// Server obj
    		//if (m_rpl.IsMaster())
    		//{
    			VObject obj = m_Owner.GetVObject();	
    		
    			vector objectPosition = m_Owner.GetOrigin();
    					
    			Resource resource = Resource.Load( entityString );
    			//Resource resource = Resource.Load("{FD7FC6D54771949A}Prefabs/Weapons/Warheads/Warhead_Smoke.et}");		
    
    			IEntitySource entitySource = SCR_BaseContainerTools.FindEntitySource(resource);
    			
    			//~ Spawn at ground or sea position
    		    EntitySpawnParams spawnParams = new EntitySpawnParams();
    		
    			objectPosition = objectPosition + "0 0 1";
    		
    		    spawnParams.Transform[3] = objectPosition;
      
    		    SCR_Global.SnapToTerrain(spawnParams.Transform, GetGame().GetWorld(), true);
    		       
    			//~ Apply scale from prefab
    		    float scale;
    			entitySource.Get("scale", scale);
    				
    			if (scale != 1)
    				{
    					SCR_Math3D.ScaleMatrix(spawnParams.Transform, scale);
    				}	            
    		        
    	        GetGame().SpawnEntityPrefab(resource, GetGame().GetWorld(), spawnParams);
    		
    			m_Owner.SetOrigin(objectPosition + "0 0 2");
    		//}
    	
    	}

     

     

    • Thanks 1

  3. The addon route makes sense to me for the reasons you stated regardless of public players.

     

    I think function separation is a good idea in an addon and separate addon/addons with a mission collections that use the addon.

     

    From a players perspective I don't mind downloading mods to join a server but prefer workshop mods because they are easier to find and download and can have dependencies.

     

    I would not call myself an arma3 developer but do dabble and sometimes use c++ in my day job.


  4. MACE uses the Zengin addon/mod(by eRazer) for its framework(cfgFunctions), which allows a smaller customisable mission with all the important functions, etc in the mod, plus you can include  SP and MP missions inside.

     

    An addon is an obstacle to some players but a logical route if you are a developer.

     

    So the choice is an logic vs public players.

     

    I think a Blitzkrieg addon would be a good idea.


  5. I think the problem was :

    condition = "object"; // Condition for attribute to appear (see the table below)+

    instead of a combination of one of the conditions below:

     

    Condition

    Conditions are written as simple expressions. Example:

    condition = "objectControllable + objectVehicle";

    All characters and vehicles will have this attribute.

     

    Supported conditions:

    Condition 	        For Type   Description
    objectBrain 	        Object 	   Object with simulation "soldier" or "UAVpilot"
    objectControllable 	Object 	   Object with simulation "soldier"
    objectAgent 	        Object     Object with non-empty agentTasks[], i.e., animals
    objectVehicle 	        Object 	   Vehicle which can be boarded
    objectSimulated 	Object 	   Object which is simulated (e.g., falls down when in the air)
    objectDestructable 	Object 	   Indestructible object, i.e., when destrType config property set not DestructNo
    logicModule 	        Logic 	   Logic which is a module (vehicleClass config property is "Modules")
    objectHasInventoryCargo Object 	   All object which as an openable inventory 
    

  6. Thank you Revo,

     

    I have previously tried adding:

      typeName = "STRING";
      defaultValue = "";
    

    to each class not using inheritance and now have also tried your example but I have the same result.

     

    Also thank for 3DEN Enhanced I have learned a lot from it , it is a essential resource for eden and learning eden editing.


  7. I am creating a edit box for a STRING in eden as an attribute.
    I have created other attributes that work for numbers but not strings

    class mazeObjectAttributes
    {
      displayName = "MAZE : Attributes"; // Category name visible in Edit Attributes window
      collapsed = 1; // When 1, the category is collapsed by default
      class Attributes
      {
    
        class mazeName
        {
          displayName = "Name";
          tooltip  = "Name";
          property = "maze_Name";
          control  = "Edit";
          expression = "_this setVariable [ 'maze_Name' ,_value];";
          condition = "object"; // Condition for attribute to appear (see the table below)
        };
        class mazeClass
        {
          displayName = "Class";
          tooltip  = "MAZE : Asset Class"; // Tooltip assigned to UI control class Title
          property = "maze_Class"; // Unique config property name saved in SQM
          control  = "Edit"; // UI control base class displayed in Edit Attributes window, points to Cfg3DEN >> Attributes
          expression = "_this setVariable [ 'maze_Class' ,_value];";
          condition = "object"; // Condition for attribute to appear (see the table below)
        };
        class mazeMax
        {
          displayName = "Max";
          tooltip  = "Max"; // Tooltip assigned to UI control class Title
          property = "maze_Max"; // Unique config property name saved in SQM
          control  = "EditCode"; // UI control base class displayed in Edit Attributes window, points to Cfg3DEN >> Attributes
          expression = "_this setVariable [ 'maze_Max' ,_value];";
          condition = "object"; // Condition for attribute to appear (see the table below)
        };
        class mazeCode
        {
          displayName = "Code";
          tooltip  = "Code"; // Tooltip assigned to UI control class Title
          property = "maze_Code"; // Unique config property name saved in SQM
          control  = "EditMulti5"; // UI control base class displayed in Edit Attributes window, points to Cfg3DEN >> Attributes
          expression = "_this setVariable [ 'maze_Code' ,_value];";
          condition = "object"; // Condition for attribute to appear (see the table below)
        };
      };
    };
    

    Is does not remember the text string I enter and show as true or false.
     
    fypGj0n.png?1
     
    What am I doing wrong?


  8. 4LJ1S25.png?1

     
    If you are looking for a project where communication, cooperation and coordination counts then the MACE PVP/TVT is for you!

    Stand in front of another player and defeat him in a virtual battle.

    MULTI-PLAYER ArmA COMBAT ENGINE

    This was first concieved as a mission within ArmA2 and has been developed and improved by the MACE/Total War community within ARMA3.

    The MACE engine is a modded version of the Zdrob Engine by eRazer, and is a platform upon which players can create any battlefield environment within ArmA3.

    Specifically for multiplayer team games - PvP/TvT, the MACE engine provides a scalable battlespace from infantry only, to full combined
    arms with support units, armored vehicles and aircraft.

    Zdrob Engine Inside

    The mission is powered by the Zdrob engine, created by its author eRazer, using his extensive experience of sqf scripting and he has over 4000+hrs within ARMA3
    mostly editing/scripting missions. This has been developed over the last 3 years with the ideas and feedback of the community (initially PAC / 9GU) and has now
    evolved into the Zdrob engine (Zengin) which is a framework/tool to build multi-player PvP/TvT missions.


    Dynamic Mission Framework

    The dynamic nature of the mission allows great variety with every mission. Its does this through customisable mission parameters and tools.

    The server administrator can choose predefined (map dependant) or "dynamic locations", with up-to 10 dynamic/moveable sectors, each with their own unique size.

    As the server fills with players, the dynamic roles and deployment systems of the mission, adapt automatically according to the No. of players on the server.
    This allows the mission to automatically change from, small scale infantry combat to large scale, combined arms battle, without restarting the mission.

    Commmunity

    The MACE project is a community of international communities, large/small and individuals players.

    We are an OPEN community of serious, hardcore, PVP players, who like a challenge.

    We are activley looking for other like minded players, groups or communites for participation in our organised battles and practice sessions.

    Game Modes

    There are a selection of game modes:
    AAS : Advance and Secure
    A&D : Attack and Defend
    KOTH : 1 Sector Control
    Search and Destroy (in development)
    Using these tools, you can safely say that, playing the same twice mission is almost impossible.

    Check more info on http://www.arma-mace.com
    For more info join our Steam Group - http://steamcommunity.com/groups/armaprmace

     

    MACE Discord

     

    MACE Twitter : @Arma3Mace

    Cheers, MACE HQ

    http://imgur.com/a/NtMnf

    • Like 2

  9. I have created a new attribute and combobox box.

     

    Which category would I use to only display this on an ammo or supply box?

    // Condition 	        For Type   Description
    // object               Object     All
    // objectBrain 	        Object     Object with simulation "soldier" or "UAVpilot"
    // objectControllable 	Object 	   Object with simulation "soldier"
    // objectAgent 	        Object 	   Object with non-empty agentTasks[], i.e., animals/
    // objectVehicle 	Object 	   Vehicle which can be boarded
    // objectSimulated 	Object 	   Object which is simulated (e.g., falls down when in the air)
    // objectDestructable 	Object 	   Indestructible object, i.e., when destrType config property set not DestructNo
    // logicModule 	        Logic      Logic which is a module (vehicleClass config property is "Modules")
    
×