Jump to content

Lucky44

Member
  • Content Count

    359
  • Joined

  • Last visited

  • Medals

Posts posted by Lucky44


  1. Thanks! That was helpful.

     

    I'm now making my life more complicated. I'm trying to create a randomized mission where IEDs get spawned around town, and hostiles and civs are wandering around; players must go through and find the IEDs, deactivate them and bring them back to their base. This proved tricky because the AI kept walking over them! So I am spawning in unarmed IEDs ("IEDUrbanSmall_Remote_Ammo")  and a trigger to detect when WEST players get within 5m of them. Then the trigger fires and replaces the unarmed one with an armed one ("ACE_IEDurbanSmall_Range_Ammo") . Working so far in SP...need to test on Dedicated server.


  2. I'm stuck trying to spawn IEDs into pre-designated locations. I can get them to spawn just fine using createVehicle, but they aren't armed and can't be armed (even with a defusal kit and by an engineer). 

     

    I'd like to be able to do both ACE IEDs and vanilla IEDs. Here's what I'm trying:

    "IEDurbanSmall_f" createVehicle IED1pos; //IED1pos is a position, not an object
    
    "ACE_IEDUrbanSmall_Range" createVehicle IED2pos; //IED2pos is a position, not an object

     

    The spawning works, but the objects spawned are ID'd as things like ied_land_small.p3d, and they don't set off a mine detector. Any suggestions how I can create both of these types?


  3. I see what you mean. I apologize for not being clearer.


    Here's what I meant: when you use just the default settings for the Spawn AI module, it picks from ALL the BIS units for that side and faction. So for NATO, for instance, it can pick from 13 at least different groups, ranging from 2-man teams to 9-man squads (and that's not including Support Infantry groups, etc.). So it seemed like the group SIZE was randomized. But it's not, and I see that now.


  4. OK, good news and bad news. 

     

    SpawnAI "Randomizing" units within a custom group: working. -By that I mean, by adding multiple groups into the description.ext CfgGroups, I get a randomized choice from the groups listed. So, effectively, that works fine. What I meant originally (and hoped for) was just listing, say, 10 units in a custom group and having the SpawnAI module pick each one from the group randomly. That works with the default/BIS units, but not once you start using custom groups, I guess. Not a big deal. -Thanks.

     

    Spawning at multiple locations: works fine. I didn't realize I had to add the custom Side and Faction info into those like I do for the SpawnAI module. -Thanks.

     

    The bad news is that I can't get my custom groups to pursue the Sector Control. I see it working fine in your demo mission. I just can't get it to work with my LOP ISTS units/groups. Here's a demo mission I've made showing how the units just spawn and stand there, ignoring the Sector Control. Of course, you need the LOP ISTS mod to see those units (from Project OpFor, https://steamcommunity.com/sharedfiles/filedetails/?id=735566597).

     

    I would guess that using any 3rd-party mod units would have the same issue.

     

    And I am betting that there's a simple fix, but I can't figure it out!


  5. On 1/4/2019 at 8:04 AM, Lucky44 said:

    BUMP: I did notice that the AI no longer pursue the Sector Control objective that I had them using. This is a change since I switched from AAF units to a custom group of LOP ISTS units - and yes, I have them all still Independents, like the AAF were. What would cause that?

     

    AND, now they only spawn at the main SpawnAI module location, not at the other spawnpoints connected to it.

     


  6. OK, Great! It's working nicely! 

     

    The one thing that's curious is that it won't randomize the units at all. It always spawns the same squad, with the same number of units (although the clothing is randomized within the proper type). It's ignoring the maximum group size specified in the SpawnAI module. Is there an easy way to add some randomness to the group size?

     

    EDIT: I did notice that the AI no longer pursue the Sector Control objective that I had them using. This is a change since I switched from AAF units to a custom group of LOP ISTS units - and yes, I have them all still Independents, like the AAF were. What would cause that?

     

    AND, now they only spawn at the main SpawnAI module location, not at the other spawnpoints connected to it.


  7. Thanks, Play3r. I tried using that approach with the SpawnAI modules, but I couldn't get it to work. The problem was with the way the script was called from the module:

     

    [_this] execVM "nameOfMyScript.sqf";

     

    It threw an error on the _this part, and then the script was this:

     

    params ["_unit"]; if !(isServer) exitWith {}; _unitToCopy = selectRandom [c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14]; _unit setUnitLoadout (getUnitLoadout _unitToCopy); lockIdentity _unit; [_unit, (speaker _unitToCopy)] remoteExec ["setSpeaker", 0, true]; [_unit, (face _unitTOCopy) ] remoteExec ["setFace", 0, true];

     

    -I have to admit I'm not real clear on this/_this and thisList, etc. And I don't know how the params command works either. (I did set up units for the array to choose from, though. I was able to jimmy it into working via a script on a trigger, but that's not a very efficient way to do it.)

     

    Does anyone know how to use the code right with the init box of the SpawnAI module?

     


  8. I'm back at it again, looking for help in blacklisting a few items from a virtual arsenal crate. 

     

    Some background:

    • I'm using ACE3 (and some other mods like RHS)
    • This will be for a multiplayer, dedicated server
    • I want to have almost everything in the VA crate, but I want to remove a handful of things

     

    I see that ACE now adds to the editor the ability to Whitelist and Blacklist individual elements. But I can't get it to work. I looked on the ACE3 site, but nothing there was helpful. Has anyone got this working? Can it be done through the editor?

     

    Thanks in advance!


  9. Here's what I'm trying to do: script damage to specific body parts so that it will register in ACE3's medical menu. While I'm at it, I'd like to be able to govern the ACE3 Medical TYPE of damage (e.g., cut, crush, velocity, etc.). 

     

    So BIS_fnc_setHitPointDamage and setHitIndex don't work. The visuals (e.g., bloody injuries) appear on the unit, and the damage happens, but it doesn't show up on the ACE3 medical system (i.e., the need for bandaging doesn't show up).

     

    I want to do this to create a way for medics to train (and be tested) using these scripts to apply damage to a unit in specific ways.

     

    I think this is very feasible, but an hour of online searching yielded me nothing. Anyone have ideas?


  10. OK, I tried yours, and it works fine.

     

    Well, I'll be honest: your code is too complicated for me. I really appreciate you taking the time to help, but I can't follow the way you've done things! (I wish I could!)

     

    But I was able to deconstruct the code and make up my own version that works:

    if (!isServer) exitwith {};
    
    private ["_pad", "_airGrp", "_Air1", "_wp1", "_wp2", "_wp3","_heli"];
    
    //spawn the helo
    	_airGrp= createGroup east;
    	_Air1 = [getMarkerPos "spawnPt", 0, "O_Heli_Transport_04_covered_F", _AirGrp] call bis_fnc_spawnvehicle;
    
    //give the helo a WP where it should (move to and) land
    	_wp1 = _airGrp addWaypoint [getPosATL pad1, 0];
    	_wp1 setWaypointStatements[ "true", "_heli = vehicle this; _heli land 'land';"];
    	_heli = (_Air1 select 0);
    	sleep 3;
    
    //wait for it to touch the ground, plus a bit
    	waitUntil{ isTouchingGround _heli };
    	doStop _heli;
    	sleep 3;
    
    //simulate infantry getting out and moving off on their own WPs
    	["", ["spawnMarker7"], 10, 12, 1, "CSAT",["WP2a","WP2b","WP2z"]]  execVM "spawnInfSqdNOSCALE.sqf";
    	sleep 15;//
    
    //make the helo takeoff, fly to a far WP and be deleted
    	_heli doMove (getmarkerPos "WP4");
    	_wp4 = _airGrp addWaypoint [getMarkerPos "WP4", 0];
    	_wp4 setWaypointType "MOVE";
    	_wp4 setWaypointSpeed "FULL";
    
    	sleep 40;//wait while helo flies off out of area, then...
    	{_heli deleteVehicleCrew _x} forEach crew _heli;
    	deleteVehicle _heli;

    The spawning of the infantry calls my own script for spawning units, obviously.

     

    Now I want to put it into a loop to do this 6 times...

     

    Thanks heaps for the help!

     

     


  11. Hmm. 

     

    I actually don't know how to use the params with BIS_fnc_spawnVehicle. (I'm not the greatest coder!) I don't even see that explained on the https://community.bistudio.com/wiki/BIS_fnc_spawnVehicle page. Is the first argument going to name the spawned vehicle? 

     

    Anyway, I've copied and pasted your code exactly. I created a blank mission on the VR map. I put the mission here, so you can see if I'm doing something wrong/different. ( https://drive.google.com/open?id=0BxwwP5x2h_hBbFlZM2ZQMVpDczA )

×