Jump to content

juleshuxley

Member
  • Content Count

    72
  • Joined

  • Last visited

  • Medals

Posts posted by juleshuxley


  1. Here is the structure of my project. It contains just two files, config.cpp and myFile.sqf:

    structure99.jpg

    config.cpp:

    class CfgPatches{
      class Test{
        author = "CaptainDucko";
        name = "S P C S";
        units[]={};
        weapons[]={}; 
        requiredAddons[]={"A3_Data_F_Enoch_Loadorder"};
        requiredVersion = 0.1;
      };
    };
    
    class CfgFunctions
    {
    	class myTag
    	{
    		class myCategory
    		{
    			class myFunction {file = "\myFile.sqf";};
    		};
    	};
    };


    myFile.cpp:

    myTag_fnc_myFunction = {
    	_returnThis = "doesnt_work";
    	_returnThis;
    };

    When I start Arma 3, I get this error:
    error77.png

    Why? I have changed the file attribute to "file = myFile.sqf" and "file = /myFile.sqf" but I get the same error message every time.


  2. Second example from that page just just does not work!!!!
    Structure:
    structure2.jpg
    Config:

    class CfgPatches{
      class SinglePlayerCharacterSwitcher{
        author = "CaptainDucko";
        version = 1.0;
        units[]={};
        weapons[]={}; 
        requiredAddons[]={};
        requiredVersion = 0.1;
      };
    };
    
    class CfgFunctions
    {
    	class myTag
    	{
    		class myCategory
    		{
    			class myFunction {file = "myFile.sqf";};
    		};
    	};
    };

    ERROR: 😡

    error2.png


  3. I want to run a function before EVERY mission. This is a QOL addon, not a scenario. I do not want the CBA dependency for something that should be so simple.

    I've spent 8 hours trying to get fn_myFunction to run when a mission is started. 🙃🙃🤬

    This is the structure of my mod:
    mod.jpg
    This is the contents of config.cpp:

    class CfgPatches{
      class SinglePlayerCharacterSwitcher{
        author = "CaptainDucko";
        version = 1.0;
        units[]={};
        weapons[]={};
        requiredAddons[]={};
        requiredVersion = 0.1;
      };
    };
    
    class CfgFunctions
    {
        class myTag
        {
            class myCategory
            {
                class myFunction {};
            };
        };
    };

    This is the result:
    error.jpg


    🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬
    WHY IT'S RIGHT HERE

    fu.jpg

    Sorry but 8 hours trying backslashes, forward slashes, changing directory structures, building, building, building I'm going insane.


  4. I want vehicles to have more smoke screens.
    I can add more smoke screen magazines with addMagazineTurret:

    _vehicle = vehicle player;
    _vehicle addMagazineTurret ["SmokeLauncherMag",[0,0],1]; // adds one smoke screen magazine containing two smoke screens

    However, it takes a minute to reload the smoke launcher. A full minute! That's way too long.

    setWeaponReloadingTime does NOTHING. (The wiki straight up telling lies at this point)

    _vehicle setWeaponReloadingTime [commander (_vehicle), currentMuzzle (commander (_vehicle)), 0.1];

    I've tried using loadMagazine to manually reload. Guess what is does NOTHING. If you use up all your smoke rounds and then add more with addMagazineTurret There is no way to reload smokes. How am I meant to create a script that reloads all smokes if loadMagazines just doesn't work.

    _vehicle loadMagazine [[0,0], "SmokeLauncher", "SmokeLauncherMag"];

    I'm in a really bad mood. I had a great idea for a mod, checked out the API, looked like I could achieve what I wanted but for some reason the smoke launcher is janky and half the commands just don't work for it. So yeah if someone has a way to get the smoke launcher to actually respond to commands I'd be grateful but I'm not holding my breath. Looks like the smoke launcher is hardcoded to be jank.


  5. The two smoke screens a vehicle has is unrealistic. The challenger, for example, can use its engine to produce smoke for as long as it has fuel. And yet the 2035 vehicles of Arma just have two poxy smoke grenades.

    Anyway, rant over. Is it possible to patch all vehicle classes to have more smokes?

    I tried putting this in my scenario file in an attempt to patch the CSAT artillery vehicle to have 6 grenades. Nothing changed. Do I need to load the .cfg file in a sqf file?

    // moreGrenades.cfg
    class CfgVehicles{
        class : 0_MBT_02_arty_F
        {
            smokeLauncherGrenadeCount = 6;
        };
    };

     


  6. When I'm the only person in a vehicle and I change seats, the vehicle screaches to a halt as if the brakes have suddenly been slammed on. Is there a way to supress this in a script? If you were to scramble into a gun turret from the driver's seat the vehicle would keep rolling under in its own inertia. How do I stop the brakes being slammed on? It happens if I teleport out of the vehicle as well. If arma detects no driver, the brakes come on it seems.

    • Like 2

  7. Two things I love? Single Player games and the Hind D.
    20201002183427-1.jpg

    As great as those missiles are, the nose mounted cannon is completely off limits to a single player like me 😞

    Do you fine people think it's possible for me to write a script that enables the mouse to control the gun and camera while the player character sits in the pilot seat and flies with WASD?

    I can actually fire the gun as the pilot using BIS_fnc_fire:

    [assignedVehicle player, "GI-2"] call BIS_fnc_fire;

    It's just a matter of getting the gun track the mouse! How do I do this?

    Basically I want to bring the way a single player and AI crew control a tank to helicopters such as the hind D. Is this possible? Can we change the helicopters roles so the gunner seat is classed as a commander seat maybe? (left right foward stop forward 😉)


  8. When a player is in the driving position in a vehicle, it's easy to find out that he is the driver:

    // assuming player is in driving seat
    assignedVehicleRole player; // returns "driver"

    However, when you're the commander or gunner you get an array that's the "turret path" of what turret you're in:

    // assuming player is in commanding turret
    (assignedVehicleRole player) select 1; // returns [0,0] often, but the commander turret can vary depending on vehicle, especially modded vehicles
    

    If the commanding turret were always [0,0] I could use that to detect if the player is in the commanding position. However sometimes it's [0,1], and on modded vehicles it can [5] or [6].

    I thought that

    (allTurrets [_this, true]) select 1// [[0],[0,0]]

    might have been the answer. That the last entry in the array it returns was always the commanding turret. This is not the case, again, often not on modded vehicles.

    Basically I'm about to go ahead and hard code every single vehicle name in my script with a reference to which turret path is the commanding position. However, before I do that, is there a cleverer way to find out if the player is in the commanding position? The moveInCommander command always moves the player to the commanding position, so there must be a way to query the vehicle and for it to give the commanding position / commanding turret path, right?


  9. With a script, how can I run the "To Commander's Seat" command? I want to move the player to the commanders seat when a key is pressed, rather than use the mouse wheel

    player moveInCommander vehicle player;

    I thought this command would do it but this moves the player into the vehicle as the commander. Any ideas on how I could get the player to move to the commander's seat FROM another seat? Is was hoping there would be a moveToCommander command but unfortunately not. Any ideas?

    Is there a way to active the action wheel with a script and trigger the To Commander's Seat action with a script?

    fu.jpg


  10. Ok so I'm in the early stages of learning arma 3 scripting. Basically inside an existing mod I find this script in the root directory:

    MyMod_init.sqf

    Based on this entry page, https://community.bistudio.com/wiki/Event_Scripts, I assume this means MyMod_init.sqf is "Executed when mission is started (before briefing screen)"

    So my question is, do you name your event scripts like this below? The name in the filename before the underscore has confused me a bit.

    <FoobarMod>_init.sqf
    <FoobarMod>_initPlayerLocal.sqf
    <FoobarMod>_initServer.sqf

     


  11. I'm creating a add on that makes it easier for one person to control a tank. I've created a mission in eden where every tank in the game is next to each other in order to test them. Whenever I makes changes to my script and restart this mission to test my script, I'm asked "are you sure you want to restart" every time. Is there a way to supress this message through a script or is the answer hidden in the options somewhere?

×