Jump to content

zigzagtshirt

Member
  • Content Count

    38
  • Joined

  • Last visited

  • Medals

Posts posted by zigzagtshirt


  1. 22 minutes ago, Jubal Savid said:

    The AI commanders are supposed to jump into a truck and drive away while under fire, they get in and 1 of 2 options happens. 
     

    They drive 5 ft and dismount or they drive wildly off course and crash into a wall


    The other problem is when my units dismount and move they walk around in circles for like 5 seconds before moving around.

    How do i fix

     

     

    As for the first issue of AI driving like morons- are you placing waypoints for them to follow? I was having similar issue at first. In my case it seemed to be that I was "over waypointing" (putting a waypoint at each bend of the road; so I was creating way too many waypoints). So for a 500 meter drive, I had the AI following like 20 or so waypoints. When I cut it down to like 2 or 3 waypoints then the issue went away.  Unlike Arma 2 AI, Arma 3 AI know on their own that they need to turn left when the road curves left (well, most of the time anyway).

     

    This may or may not be relevant to you, but thought I'd share in case it helps anyone else.


  2. On 12/8/2018 at 3:04 AM, Kaede Takagaki said:

    Hi all:

    Maybe everyone have complained about AI aim is too accurate, but I got a opposite problem. It’s usually happened in my mission,AI has poor aim performance in mid range , like 2 squad shot each other I see them used more than 6 mags then may able to kill one of the enemy.....so I wonder is any scripts able to make it’s must be hit targets during the complex shot time(like among each 10 shots must contain one time shot able to on target)

    Then still any way able to let AI fire the weapon and also keep moving but not stand or lay down?(like AI move forward and firing in same time)

    Thanks for help.

     

    Is your mission stressing the server too much? As server becomes more stressed, AI performance can suffer. I've experienced similar issues which were resolved by hosting the server on a more powerful machine or setting up some headless clients.


  3. 2 minutes ago, Grumpy Old Man said:

    It's not obvious at first, but you need individual render targets, in your case "piprendertg":

    
    _pipcam1 cameraEffect ["Internal", "Back", "piprendertg1"];
     _screen1 setObjectTexture [0, "#(argb,512,512,1)r2t(piprendertg1,1)"]; 
    
    _pipcam2 cameraEffect ["Internal", "Back", "piprendertg2"];
     _screen1 setObjectTexture [1, "#(argb,512,512,1)r2t(piprendertg2,1)"]; 
    //etc.

    Cheers

     

    Womp womp. I knew it was something stupid. I was hoping you'd be around to set me straight, Grumpy. THANK YOU!

    • Like 2

  4. 27 minutes ago, johnnyboy said:

    Is it because both _screen1 and _screen2 are set to same tv1 object?

     

    script 1:

    _screen setObjectTexture [0, "#(argb,512,512,1)r2t(piprendertg,1)"];

     

    script 2:

     

    _screen2 setObjectTexture [1, "#(argb,512,512,1)r2t(piprendertg,1)"];

     

    tv1 object is a dual screen monitor. The 0 refers to left screen; 1 refers to right screen.

     

    I even tested this with two completely different objects and the first camera was still mirrored across both.


  5. I have the dual-screen monitor object placed in mission. I have successfully created a "PIP camera" and attached it to the first monitor.  However, when I create a separate, distinct instance of another one and try to attach it to the second monitor, all I get is the first monitor mirrored on the second instead of the different camera.  What am I doing wrong?  I feel silly for asking.  Here are my scripts:

     

    //Camera 1

     

    _screen = tv1;
    _screen setObjectTexture [0, "#(argb,512,512,1)r2t(piprendertg,1)"];

    _pipcam = "camera" camCreate [0,0,0];


    // set exact yaw, pitch, and roll
    _y = 72; _p = -27; _r = 0;
    _pipcam setVectorDirAndUp [
        [ sin _y * cos _p,cos _y * cos _p,sin _p],
        [ [ sin _r,-sin _p,cos _r * cos _p],-_y] call BIS_fnc_rotateVector2D
    ];

    _pipcam cameraEffect ["Internal", "Back", "piprendertg"];
    _pipcam camSetFov 0.75;

    _campos = [11441.9,14226.4,12.213];
    _campos set [2,12.213];
    _pipcam setpos _campos;

     

    /////////////////////////////////////////////////////////////////////////////////////////////////////////

     

    //Camera 2

     

    _screen2 = tv1;
    _screen2 setObjectTexture [1, "#(argb,512,512,1)r2t(piprendertg,1)"];

    _pipcam2 = "camera" camCreate [0,0,0];


    // set exact yaw, pitch, and roll
    _y = 229; _p = -29; _r = 0;
    _pipcam2 setVectorDirAndUp [
        [ sin _y * cos _p,cos _y * cos _p,sin _p],
        [ [ sin _r,-sin _p,cos _r * cos _p],-_y] call BIS_fnc_rotateVector2D
    ];

    _pipcam2 cameraEffect ["Internal", "Back", "piprendertg"];
    _pipcam2 camSetFov 0.75;

    _campos2 = [11460.2,14242.3,17.1712];
    _campos2 set [1,17.1712];
    _pipcam2 setpos _campos2;
     

     

     

     

     


  6. 8 hours ago, HazJ said:

    Do normal weapons work under water IRL? I didn't think they did (especially deep under water). Or at least the projectile would deter accuracy, range, etc...

     

    Generally, no. Some may if prepped correctly. Otherwise, you are likely to destroy the firearm and potentially injure yourself. 

     

    I believe the HK 416 is a bit more forgiving than the standard AR/M4/M16 platform, but it should still be drained of water before discharging.

     


  7. On 6/17/2018 at 9:30 AM, Suplextron said:

    My mission works fine up until today, when I place new units in, at the mission start, they holster their weapon before exploding as if dropped from height.

     

    tried using e respawnOnStart = 0; in Description.ext but to no avail.

     

    Any clues what could cause this?

     

    Have you checked to see if their altitude in the editor is equal to the terrain height? In other words, are you sure you're not starting them in mid-air (even by a few feet)? 


  8. On 6/9/2018 at 7:08 PM, vihkr said:

    Ah shit. So large scale battles are a pipe dream? (And that explains why nearly all the missions are spec ops teams whacking guys?)

     

    If you use headless clients then they are doable, but it will depend on how many headless clients you have running and how much AI each of them can handle.

     

    On 6/9/2018 at 10:15 AM, vihkr said:

    This very interesting, thanks. I'm going to try it out this weekend. The eventual goal is to transfer this scenario to a dedicated (rented) server. Can I run the HC on that server or is that not doable?

     

    Headless clients work with dedicated servers the same as regular servers.


  9. Add some headless clients slots to the missions. This will at least give you the option of offloading the AI to one or more headless clients if available. Adding the slots does not necessitate their use, but allows you to use them if you want.

     

    Look into Werthles Headless Client script. https://steamcommunity.com/workshop/filedetails/?id=459850665

     

    I would avoid the module and use the standalone script as the module has been buggy at times.

     

    If you aren't familiar with headless clients in Arma 3, it will take a little effort to understand and set up in the beginning, but once you are off and running you should see significant performance, stability and FPS improvements. Additionally, the AI fight more like actual soldiers vs. brain dead zombies since they don't have to compete for server resources to make them function.

     

    If you are using a i7-4770K on the server machine, you have plenty of CPU threads to spare for two headless clients running alongside the server on the same machine. Our guy runs the server alongside two HCs using a i7-4770K and still plays the missions on the same machine. Performance may vary depending on the content played, so I can't promise anything, but I'd say give this a try in addition to the other suggestions on optimizing your missions.

     


  10. 8 hours ago, Durgan said:

    So I'm new to scripting and everything I'm doing is just trial and error. I've tried looking for a while can't find a solution to what exactly I'm looking for. I remember in the Arma 2 Harvest Red campaign that there were radio stations that would blab on and on about the news and get louder as you got closer to them. In the mission I'm making, there are a few hidden propaganda trucks (truck_A, truck_B, truck_C etc) that I want to quietly play music (song_1, song_2 etc) once a player/s enters a trigger area and grow louder & loop as the player/s get closer. Then, once the truck is destroyed, I want the music to stop playing from that truck.

     

     

    Did you try say3D?

     

    https://community.bistudio.com/wiki/say3D

     

    Create trigger; set to repeat; set activation area; ON ACT: PLAY3D_SCRIPT; ON DEACT: same PLAY3D_SCRIPT but replace the sound name with empty quotes ("") to stop it.

     

    play3D will stop playing automatically once the object is destroyed. 

     

    Note: untested; this is from memory. Someone correct me if this won't work.


  11. I made a sort-of keypad script of my own to disarm bombs and access protected cell phones/computers, etc. However, it utilizes the action menu instead of a GUI with buttons. I would love to upgrade it to an actual keypad GUI, but as is it gets the job done.

     

    I know it's not exactly what you're looking for but I'm willing to share if you're interested. 


  12. Hi Silentghoust, 

     

    I wrote my own ai mortar script that uses an ai spotter to visually identify targets and call shots for an associated mortar battery. I think it could be modified with a little work to be used for counter artillery. I've been looking for a new scripting project lately and this sounds like it would be interesting and I've been meaning to make something like this for a while now.

     

    If you're interested in collaborating with me on this, send me a PM.


  13. Is there a way I can detect if ANY task has been completed by a side? I know how to detect if a specific task is completed, but I am running a server with randomly generated tasks so I don't know what they'll be ahead of time. Is there an event handler for this? My goal is to reward BLUFOR with additional respawn tickets when any task has been completed. Tasks are generated while in game.


  14. 12 hours ago, theend3r said:

    Not if they have simulation disabled, afaik.

     

    Edit: So it seems they can take damage. In that case I apologize, your solution is indeed the correct one. Spawning by script is still preferable, though.

    I can't really check either way because I'm on a business trip 500km from home.

     

    Thanks for the clarification. Agreed; spawning is the preferred method.


  15. 13 hours ago, theend3r said:

    zigzagtshirt's method, i.e. hiding them and disabling their sim until you need them (not moving them over, that's a waste) works but actually learning how to spawn them is far better in the long run.

     

    Something like:

    
    _group = createGroup east;
    for "_i" from 1 to (5 + (floor random 10)) do {
    	_dude = _group createUnit ["O_V_Soldier_ghex_F", getMarkerPos spawn_marker_name, [], 0, "NONE"];
    	//code exported from virtual arsenal to give _dude equipment
    };

    If you really don't want to use any scripts, using

    
    {_x hideObject true; _x enableSimulation false} forEach unit group this;

    In one of the group's units in the editor allows you to place (preferably cycled) patrol WPs as well and then just unhide them the same way.

     

    Try to learn the code way if possible, though, it'll make you missions 100x more awesome.

     

    I never considered hiding them instead of moving them out of the way until needed hmm.  I always assumed that if they are hidden, they could still take damage and could have others bump into them. Is this not the case?


  16. 22 hours ago, NeoArmageddon said:

    Get the A3 Tools from Steam, mount the WorkDrive (aka P: drive) and create a folder in it with a structure like this:

    - Tag

    - - AddonName 

    - - - config.cpp

    - - - music

    - - - - All your music files

    While "Tag" is a custom tag you define for yourself, or your squad.

    Edit config.cpp (basically an description.ext for an addon) with an editor of your choice and add a class CfgPatches and a class CfgMusic. It should look like this:

    
    class CfgPatches
    {
    	class TAG_MyMusicAddon
    	{
    		name = "MyAddon";
    		author = "Me";
    		url = "http://xkcd.com";
    		requiredVersion = 1.80; 
    		requiredAddons[] = {};
    		units[] = {};
    		weapons[] = {};
    	};
    };
    class CfgMusic
    {
    	tracks[] = {MyMusic1,MyMusic2};
    	class MyMusic1 //This is arbitrary
    	{
    		name	= "My first track";
    
    		// filename, volume, pitch
    		sound[]	= { "\Tag\AddonName\music\filename.ogg", db + 0, 1.0 };
    	};
    	class MyMusic2
    	{
    		name	= "My second track";
    		sound[]	= { "\Tag\AddonName\music\filename2.ogg", db + 10, 1.0 };
    	};
    };

    Now start AddonBuilder from tools and use it to pack this AddonName-folder (not the Tag folder!!!) to a PBO. Keep an eye on the virtual path so AddonBuilder packs it correctly under \Tag\AddonName.

     

     

    I got it working. Thanks again for the help!

    • Like 1

  17. My somewhat primitive method for doing something like this is to create the group(s) in the editor and create all the waypoints, etc. However, I place them in a remote location on the map where no one will be and set their simulation status to "false" so they will be frozen.

     

    I then set a trigger that will execute script that will move them to where I need them to be via setpos and enable their simulation. Then they will come alive and perform all of the waypoints I created.

     

    This keeps me from having to mess around with spawning scripts, and it allows for setting loadouts and waypoints with the editor in a normal way.

     

    Example "Come alive/teleport to marker" script:

     

    {_x setpos getmarkerpos "group_marker1"} forEach units group group_leader1;

    sleep 1;

    {_x enableSimulationGlobal true} forEach units group group_leader1;

     

     

    Make a marker "group_marker1" to mark where the group will teleport to. Name the leader of the group "group_leader1". The enableSimulationGlobal true will make them come alive. Execute the script with a trigger after your desired conditions are met.

     

     


  18. 4 minutes ago, NeoArmageddon said:

    Get the A3 Tools from Steam, mount the WorkDrive (aka P: drive) and create a folder in it with a structure like this:

    - Tag

    - - AddonName 

    - - - config.cpp

    - - - music

    - - - - All your music files

    While "Tag" is a custom tag you define for yourself, or your squad.

    Edit config.cpp (basically an description.ext for an addon) with an editor of your choice and add a class CfgPatches and a class CfgMusic. It should look like this:

    
    class CfgPatches
    {
    	class TAG_MyMusicAddon
    	{
    		name = "MyAddon";
    		author = "Me";
    		url = "http://xkcd.com";
    		requiredVersion = 1.80; 
    		requiredAddons[] = {};
    		units[] = {};
    		weapons[] = {};
    	};
    };
    class CfgMusic
    {
    	tracks[] = {MyMusic1,MyMusic2};
    	class MyMusic1 //This is arbitrary
    	{
    		name	= "My first track";
    
    		// filename, volume, pitch
    		sound[]	= { "\Tag\AddonName\music\filename.ogg", db + 0, 1.0 };
    	};
    	class MyMusic2
    	{
    		name	= "My second track";
    		sound[]	= { "\Tag\AddonName\music\filename2.ogg", db + 10, 1.0 };
    	};
    };

    Now start AddonBuilder from tools and use it to pack this AddonName-folder (not the Tag folder!!!) to a PBO. Keep an eye on the virtual path so AddonBuilder packs it correctly under \Tag\AddonName.

     

     

    Many thanks, Neo! Very helpful!  I will give this a try tonight!


  19. I have a collection of custom music tracks that I use with a "jukebox" script in the missions I make for my unit. Each mission file ends up being around 55-60 MB which makes sharing the missions a pain.

     

    I was thinking it would be simpler and cause fewer headaches if I could package the tracks into a mod (and have it available on Steam workshop for my unit). This way they only have to download the tracks once vs. downloading them with every mission I send them.

     

    Can someone help point me in the right direction with accomplishing this? I have all the tracks ready to go in a directory. I assume I would need to set up some kind of description.ext -type file similar to what you have to do to add custom tracks to individual missions? Otherwise I'm lost on how to proceed from here on how to 1) create and prepare required files 2) and use Arma tools to create a mod package.  Any help would be most appreciated!


  20. name helo "helo1" and helipad "helipad1"

     

    Create a trigger:

     

    condition:

    (helo1 distance helipad1) < 2 && (isTouchingGround helo1);

    on act:

    helo1 setVehicleAmmo 1; helo1 setDamage 0; helo1 setFuel 1;

     

    If you don't want it to be instantaneous, set the Timeout time to however long you want the helo to have to remain on the pad before.  if you want the rearm, repair, and refuel to take different amounts of time each, create separate triggers for each and set unique timeout times. 

     

    EDIT: set trigger to repeat if you want it to work multiple times, else it will only work once.

     

×