Jump to content

bhaz

Member
  • Content Count

    588
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by bhaz


  1. class ace_sys_stamina
       {
           class Panic_Button
           {            
               key = 69;    // Num - Whatever
           };
       };
    
    ...
    
    NUM = 69

    Does this refer to num-lock, or just any num key?

    Does the radio pack object currently have a purpose within ACE? I've searched both threads and there's no mention of it on the wiki pages.

    I'm referring to the large radios (ACE_PRC119) that take up the backpack slot. Do they have a practical use in any mission, or are they just in place for mission designers to make use of?


  2. He also took out 3 of my Abrams TUSKs when we tried to go kill him. Then we tried attacking from a different direction with air.

    Why go on foot with AT? If you don't even know where he is. He's constantly relocating.

    The whole cheating thing aside

    I was just posting about the game balancing in general, that there is nothing wrong with it.

    The guy you mentioned in the first post was cheating, there's no way a shilka can take more than one hit from any missile or launcher in the game, unless it hits the front corner, test it in the editor if you have to.


  3. bhaz> if I want an array of enemys as well... how would I do that? if possible...

    If it's not important to know who spotted them, then something like this would work:

    _unitArray = [s1, s2, s3, s4, s5, s6, s7, s8, s9, s10];
    _enemyArray = [enemy1, enemy2, enemy3, enemy4];
    _i = 0;
    _spotted = 0;
    
    for "_i" from 0 to ((count _enemyArray) - 1) do {
       _spotted = _spotted + ({(_enemyArray select _i) knowsAbout _x > 3} count _unitArray);
    };
    
    if (_spotted > 0) then {
       hint "units were spotted";
    } else {
       hint "no units were spotted";
    };

    If you need to know who spotted the player/s:

    _unitArray = [s1, s2, s3, s4, s5, s6, s7, s8, s9, s10];
    _enemyArray = [enemy1, enemy2, enemy3, enemy4];
    for "_i" from 0 to ((count _enemyArray) - 1) do {
       if ({(_enemyArray select _i) knowsAbout _x > 3} count _unitArray > 0) then {
           hint format ["player has been spotted by %1", _enemyArray select _i];
       };
    };

    Problem is with this one, if a player has been spotted by all enemies, the script will trigger itself once for each enemy.

    edit: I haven't actually tested either of these, might go do it now.

    edit2: working as intended :) You can also change the number "3" something else to change sensitivity of the script. knowsAbout ranges from 0, being completely unknown to 4, "i'm looking at you".

    edit3: You could also use the first script and add the enemies that spotted players to an array:

    _unitArray = [p1];
    _enemyArray = [e1, e2, e3, e4];
    _spottedBy = [];
    _i = 0;
    
    for "_i" from 0 to ((count _enemyArray) - 1) do {
       if ({(_enemyArray select _i) knowsAbout _x > 3} count _unitArray > 0) then {
           _spottedBy = _spottedBy + [(_enemyArray select _i)];
       };
    };
    
    if (count _spottedBy > 0) then {
       hint format ["Player/s were spotted by: %1", _spottedBy];
    } else {
       hint "No players were spotted";
    };

    For example, if players were spotted by e2 and e4, the hint would display as "Player/s were spotted by: [e2, e4]".


  4. Never mind, solved it.

    You can find out the direction of a turret by comparing the direction between the gunner and his assistant, ie:

    _numVectorX = (getPos _objGunner select 0) - (getPos _objAssist select 0);
    _numVectorY = (getPos _objGunner select 1) - (getPos _objAssist select 1);
    _numDirection = (_numVectorX atan2 _numVectorY) + 108;

    When adding 108 (the angle the gunners are on compared to the turret's facing), this will return the compass direction of the turret itself. I'd imagine this could be extended to other vehicles as well.

    I ended up going with another idea though, because the nature of my mission means the assistant might get killed, and ensuring there was always two gunners during the calculation is more work than it was worth.

    It was easier just to force the gunner to face north, ensuring that the attachTo command ended up in the same position every time, by creating an invisible H 100 metres north of the mortar, forcing a doWatch then deleting it.

    _objTemp = "HeliHEmpty" createVehicle (position _objMortar);
    _objTemp setPos [getPos _objMortarGunner select 0, (getPos _objMortarGunner select 1) + 100, 0];
    _objMortarGunner doWatch _objTemp;
    sleep 5;
    deleteVehicle _objTemp;


  5. I'm trying to make a script that will allow an AI squad to pick up and transport a single mortar, which involves using attachTo to place the mortar on the units back.

    If a mortar is placed at heading 0, and the gunner jumps in and rotates the mortar facing east, the heading is still returned as 0. Upon placing the mortar on the unit's back, depending on the direction the turret was facing, it ends up in some odd positions.

    What I'm trying to figure out is how to find the current direction of the turret so I can rotate it accordingly, or better yet, set the turret's direction. Anyone have any ideas?


  6. Please consider distributing via six-updater, it's perfect for large mods in flux.

    +1, this definitely deserves a seat next to all the other sound mods.

    This is what my shortcut target line looks like -"C:\Program Files\Steam\Steam.exe" -applaunch 33900 -nosplash -mod=@ACE;@ACEX;@CBA;@ACEX_PLA;@ACEX_SM;@CSM2;@CAA1;@OAC_core;@WarFXParticles;@JTD;@All;@BWMod;@TRSM_Tracked_Vehicles

    Try placing @CBA at the beginning, and @CSM2 at the end, or at least past anything sound related.

    Make sure your csm2_clientside_config.cpp is placed at "...\Bohemia Interactive\ArmA 2\userconfig\CSM2", and if you're running ACE, make sure there's no "//" infront of the #define CSM2_ACEX_SM. I've also found that running ACE and CSM2 without ACEX_SM will produce an error, so it's probably best to run all three.


  7. The whole cheating thing aside, I can't really see where this argument is coming from. AA is overpowered to air, just as a man crouching in the forest 1km away with a Javelin is overpowered to the AA. It's all about the paper > scissors > Abrams.

    If you think of ArmA2 as more of a strategic game, there isn't one single unit available that cannot be countered with the use of strategy and tactics.


  8. Things like that always seem to be hit and miss, (old OFPEC thread) though I think the AI are only built to use the designator on armored targets.

    Maybe you could keep the whole selectWeapon thing there just for show, and simulate the entire airstrike, or whatever it was you're after. You could createVehicle a "LaserTarget" on the spotted player's position, then use doTarget with an air unit to fire on the position.

    As far as I know the AI are usually pretty accurate when it comes to firing at laser targets, if not, you could always just createVehicle the bomb in the correct position.


  9. I understand, but what if I do not have any specific unit that I am looking for? I am wanting it to trigger for any EAST unit?
    For any target:

    An east spotted by west trigger (or whatever is relevant), the trigger can be moved with the group using a simple setPos loop. ie:

    while {alive player} do {
       _trigger setPos (leader player);
       sleep 2;
    };

    If you don't want to place triggers via the editor there's always the createTrigger command and all the others that go with it.

×