Jump to content

bull_a

Member
  • Content Count

    305
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by bull_a


  1. Syntax is incorrect on last "if" statement. As well as this, your script can be formatted in a much better way (complying to scripting standards):

     

    You need to make sure "Fnc_Set_Textures" is defined as a global variable somewhere in your mission. I recommend defining it in the CfgFunctions class (although it will reformat the name). Simplest way would be to define it in the init.sqf

    // init.sqf
    
    Fnc_Set_Textures = {
        // Your code here
    };
    
    // ... 

    Rewrite your code from this: 

    Fnc_Set_Textures = {
      _vehicle = _this param [0,objNull,[objNull]];
      if (isNull _vehicle) exitWith {false}; // returns false if no vehicle given
      private ["_texture","_selection"];
      switch (typeOf _vehicle) do {
        case "I_Heli_Light_03_unarmed_F" : {
          _texture = "Hellcat_Template1.paa";
          _selection = 0;
        };
        case "B_MRAP_01_hmg_F" : {
          _texture = "hex1.jpg";
          _selection = 0;
        };
        case "O_Quadbike_01_F" : {
          _texture = "hex1.jpg";
          _selection = 0;
        };
        case "B_MRAP_01_F" : {
          _texture = "hex1.jpg";
          _selection = 0;
        };
        case "B_SDV_01_F" : {
          _texture = "hex1.jpg";
          _selection = 0;
        };
        default {
          _texture = "#argb(8,8,3)color(1,1,1,1)"; // default white texture
          _selection = 0;
        };
      };
      _vehicle setObjectTextureGlobal [_selection,_texture];
      // return vehicle
      _vehicle;
    };
    
    

    Call using:

    [(_this select 0)] call Fnc_Set_Textures;
    

    PLEASE NOTE: Not all vehicles have hiddenSelections (texture maps) that can be changed. I recommend you look through the config viewer before trying to change vehicle textures to make sure you have the right selection. I would also recommend using .paa extension over the .jpg extension. Both should work, but .paa is native to the engine and is better practice.

     

     

    Hope this helps,

     

    Bull

    • Like 1

  2. Hi all,

     

    I want to create some more custom task icons, to be used with the new task system. However, I've ran into a bit of a hiccup, of which the problem is that the new icons I have defined do not show/are not being found.

     

    Here is my description.ext

    // Task system
    taskManagement_markers2D = 1; // Uses new task markers
    taskManagement_markers3D = 1; // Uses new task markers
    taskManagement_propagate = 0; // Shares tasks
    taskManagement_drawDistance = 2500; // Max distance for task markers
    3dDrawDist = 2500; // Max distance for task markers
    
    class CfgTaskTypes {
      class 1 {
        icon = "data\img\taskIcon_1_2D_ca.paa";
        icon3D = "data\img\taskIcon_1_3D_ca.paa";
      };
      class 2 {
        icon = "data\img\taskIcon_2_2D_ca.paa";
        icon3D = "data\img\taskIcon_2_3D_ca.paa";
      };
    };
    

    I have followed the steps defined here: https://community.bistudio.com/wiki/Arma_3_Task_Enhancements

     

    This is the code that creates the task (executed on the server):

    [
      west,
      "Task1",
      ["Task 1 Description","Task 1","TASK"],
      "task1",
      true,
      2,
      false,
      "1",
      false
    ] call BIS_fnc_taskCreate;
    
    [
      west,
      "Task2",
      ["Task 2 Description","Task 2","TASK"],
      "task2",
      true,
      1,
      false,
      "2",
      false
    ] call BIS_fnc_taskCreate;
    

    I am at a loss as to why this is not working, hopefully someone can shed some light on the situation.

     

    Regards,

     

    Bull


  3. What functions do you use?


    There not many that I don't use :) 


     


    What functions need improvement?


    BIS_fnc_inTrigger - doesn't work with some axis values


    BIS_fnc_animalBehaviour - runs at least four threads at the same time (would like this to have the option to toggle on off)


     


    What functions would benefit from dedicated scripting command?


    BIS_fnc_relPos -> position = relPos [position, direction, distance]


    BIS_fnc_position -> positionArray = parsePosition String/Object/Array


    BIS_fnc_addStackedEventHandler -> id = addStackedEventHandler [handlerName, execute, function]


    BIS_fnc_returnChildren -> configArray = configChildren [config, depth, lastTier]


    BIS_fnc_returnConfigEntry -> value = config configEntry [attribute,defaultValue]


    BIS_fnc_configPath -> return = config configPath dataType


    BIS_fnc_secondToString -> timeString = secondToString [time, format] (format e.g. "HH:MM:SS.MS")


    BIS_fnc_colorRGBAtoHTML -> colorString = colorRBGAtoHTML colorArray


    BIS_fnc_colorRGBAtoTexture -> colorString = colorRBGAtoTexure colorArray


    BIS_fnc_colorRGBtoHTML -> colorString = colorRBGtoHTML colorArray



  4. Hi all,

     

    I am making a multi player mission where I want the player to join the mission and have the option to pick from multiple respawn positions. However, to do this at the moment means respawning the player at the start with "respawnOnStart = 1". This is undesirable as I have "respawnDelay = 120".

     

    Is there a way to either:

     

    1. Access the "MenuPosition" dialog on mission start using a parameter such as "respawnOnStart = 0"

    2. Set the respawn timer to "0" when the player first join the mission

     

     

     

    Thanks

     

    Bull


  5. I did the thing you said with the trigger, the timer works fine, but I changed the activation to BLUFOR and there's only civilians and OPFORs in the area and the trigger automatically activates itself.

    Is it about the condition true?

    Yes, I was under the impression the trigger was to activate at the mission start.

     

    If you want the trigger to activate after a condition is met i.e. BLUFOR units are in the trigger area, then set the condition back to "this" (it's default state).

     

    Then you can set the parameters in the trigger dialog box in the editor :)


  6. Unfortunately I have not found an easy way to do this. 3DEN uses different SQM format (hence the reason for importing 2D missions into the editor) so in theory you could just figure out what has changed (im sure the list is extensive) and then go into the mission SQM and change the format yourself (or with a tool - I believe a community member is already working on something like this! ).

     

    Other than that, I'm pretty sure there isnt a way.

     

    Sorry to be the barer of bad news

     

     

    Bull


  7. Thanks all,

     

    I was hoping this wouldn't be the case, but I was starting to think that the ATM's were "landscape" objects. Performance is not an issue as it is a script ran once in Pre-Init (just means higher load on the server at the start, along with a slower loading time, not really important atm) 

     

     

    Sucks that not all world objects are standardise  :(

     

    Thanks for the help,

     

     

    Bull


  8. Hi all,

     

    I've had a quick search on the forums and couldn't find what I was looking for. I'm trying to create an array of "Land_Atm_01_F" objects which I can create markers for on the map.

     

    Code:

    _worldRadius = worldSize / 2;
    _worldCenter = [_worldRadius,_worldRadius,0];
    _atmObjects = nearestObjects [_worldCenter,["Land_Atm_01_F","Land_Atm_02_F"],_worldRadius];
    
    _atmObjects; // return
    

    At The Moment (excuse the pun) the function is only returning an empty array. When I position a player and look at an ATM the cursorTarget returns nil. I'm struggling to understand why this is happening, so if anyone can shed light on the situation I would be grateful.

     

    Regards,

     

    Bull


  9.  

    best practice would be to wrap in brackets to ensure it executes correctly

    checkpoint1 = createVehicle ["Sign_Circle_F",(_posArray select 0),[],0,"CAN_COLLIDE"];
    

     

     

    Entirely misinformation in this case.

     

     

    How is this misinformation, it may have been the cause of the problem! The use of the brackets (in this situation) is best practice!


  10. I've done a bit of research and context menu seems to be the type defined in the Scrollable Action Menu. I have a feeling that this type will only work when combined with a Listbox (or equivalent). I'm not entirely sure as I cant seem to access any functionality when using it, but like you said, it would appear that the commands attached to the CT_CONTEXT_MENU control type are hardcoded by the game engine.


  11. I dont particularly understand what youre asking, but I assume youre trying to create a bunch of markers in a script

     

    Please look at the Marker Scripting Commands Group

     

    A quick google search would have revealed this for you. Take a look at the available commands with the examples first before posting.

     

     

    Anyway, here is the code that you will need:

    _markerPositions = [[x1,y1],[x2,y2],...,[xn,yn]]; // A nested array of 2D positions
    {
       _position = _markerPositions select _forEachIndex; // Selects the marker position from the list
       _markerName = format ["ArrayMarker_%1",_forEachIndex]; // Creates a name variable
       _marker = createMarker [_markerName,_position]; // Creates a global marker with name from variable above
       // Sets the marker properties
       _marker setMarkerType "hd_dot";
       _marker setMarkerColor "ColorBlack";
       _marker setMarkerDir 0;
       _marker setMarkerSize [1,1];
    } forEach _markerPositions;
    

    Bull


  12. No need to synchronize the trigger for triggering the event.

     

    Things to do:

     

    1. Desynchronize the trigger, unless its synchronized to a waypoint (if it synced to the gun, it doesnt do anything).

    2. In the trigger 'condition' field write the following:

    !(isNull (gunner Mk1)) && !(alive Mk1)

    3. In the 'on activation' field write the following:

    _nul = [Mk1, "t1", "t2", "t3", "t4", "t5", "t6", 600] execVM "randomfire.sqf";

    4. Set the 'Countdown' or 'Timeout' to number values at your descretion

     

     

    Hope that helps,

     

    Bull


  13. Someone (the name escapes me) was working on an extension to play video's as textures on world objects.

     

    As for a video playing in the map you would need to create a RscTitles display. (See UI Documentation for details). You can create the resource using cutRsc ["RscName","PLAIN",true]. This will create a rsc layer that will be displayed even when the map is open. Its just a case of positioning the resource using the ctrl command set.

     

    You can create a class and give it a type of static video. Then using some scripting commands you can call the video to play (with sound), much like BI has done with their functions.

     

     

    Hope this points you in the right direction

×