INCON Scripts for ALiVE - Intel + AI teammate persistence

  1. ‹ Older
  2. 7 years ago
    Edited 7 years ago by SpyderBlack723

    Suggestions:

    Ability to define trespassing zones using markers, where an internal script/loop handles the checking as opposed to triggers. (inArea command is useful for this)
    Benefits: one loop instead of many

    A Github "release" if you know how or want to learn how to use it.

  3. Yup, great shout on both counts. Probably ought to get my head around GitHub sooner or later. Any ideas of a good way of getting whether a unit is in one of several marker areas without resorting to an enormous if condition? I couldn't see an obvious way when I was looking at vanilla solutions so maybe CBA has something useful.

  4. Actually what would be really cool to do is have some kind of tag in the marker name that autodetects any trespass markers. Now I know what I'm doing for my next weekend project..

  5. check out the inArea command

  6. Man, I really need to sit down with one of my mission makers and get this into some of our stuff. It really opens up some good Covert action ideas.

  7. Me too. It's tops on my list for my next project I just need to finish up my current project. Hopefully that's not discouraging Incontinenetia at all. I'm really looking forward to spending time with this.

  8. Edited 7 years ago by incontinenetia

    Good to hear it's hopefully going to be useful! Just keep in mind this is my first foray into scripting so things may change a bit as I learn more.. on the other hand, I put a lot of effort into optimising the detection scripts and think I've found a pretty speedy solution for that, which is the core of it.

    Intel will probably be in the next update too. Just have to get some final tests done.

    @SpyderBlack723, I had a look at the inArea command and can't see anything about checking an array of markers, is it able to do that? As in:

    _unit inArea ["marker1","marker2","marker3"]

    Away from my PC for a couple of days but will check it out in a bit more detail when I'm back.

    Edit: Or something like this:

    [_unit,_trespassMarkers] spawn {
    
        params [["_unit",objNull],["_trespassMarkers",[]]];
    
        sleep 2; 
    
        private _activeMarker = [];
    
        for "_i" from 0 to (count (_trespassMarkers - 1)) do {
    
            _entry = _trespassMarkers select _i;
    
            if (_unit inArea _entry) then {
                _activeMarker pushBack _entry;
            };
        };
    
        if (_activeMarker != []) then {
            _unit setVariable ["trespassingType2",true,true];
        } else {
            _unit setVariable ["trespassingType2",false,true];
        };
    
    
        !(_unit getVariable ["isUndercover",false])
    
    };
  9. Edited 7 years ago by SpyderBlack723
    _markers = [...];
    _unit = ...
    
    private _detected = false;
    {
        if (_unit inArea _x) exitWith {
            _detected = true; // exitWith can terminate forEach early
        };
    } foreach _markers;

    or if you're an optimization freak you could substitute count for foreach, which loops a little bit faster.

    _markers = [...];
    _unit = ...
    
    private _detected = false;
    {
        if (_unit inArea _x) exitWith {
            _detected = true; // exitWith can terminate forEach early
        };
    
        false
    } count _markers;
  10. Edited 7 years ago by incontinenetia

    Of course it's that simple! Not sure why I didn't think of that. Cheers again Spyder.

  11. So, usage question. I place everything INSIDE the Missionname.terrain folder inside my saved mission file correct?

    So all of that stuff (INCON, ds.store*, init.sqf and description.ext) go in there, and I modify the UCRsetup.sqf inside INCON to set my factions and such. Is that correct?

    And for any UC units, I place the appropriate init code from above into the group leaders init variable field?

    And this will work without Alive, correct? Trying to work on a black ops trainer mission that does not utilize ALiVE at this time.

  12. Edited 7 years ago by incontinenetia

    Hi @ski2060, give me a minute and I'll get the new version up. But yeah, that's pretty much it! The recruitment won't work with ALiVE so make sure you set up the options with that in mind.

    Edit: new version is up, mini changelog:

    - Changed from trespass triggers to markers - thanks to Spyderblack once again (include INC_tre in your marker name and the script will handle the rest)

    - Some general optimisations

  13. cool, just got it.

    Sooo.. tried it out and promptly got shot in the face by the IndFor I was trying to blend in with.

    I'll have to try it again and see if I got it all correct.

    Will it hurt anything if I put the init code into every playable slot, instead of just the group leader?

  14. Haha oh dear. Yeah, maybe give that a go.. is your group leader a player?

    Regarding getting shot, did you get close to the IND guy? Or spawn next to him? It takes a short while to initialise and the cover will only work at a certain distance.

    Otherwise, I'd check you have set up the uniforms properly maybe.

  15. Ok, distance was probably it. I was checking to see if they would just open fire on me, and I was pretty close via teleport.

    I'll test some more out tomorrow on my off day, and try longer distances.

    I was just using standard CIV_F clothing, no backpack, no vest etc.

    Oh.. do any backpacks set off the discovery? Or all backpacks exempt from discovery checks?
    being able to carry all my gear in a backpack, posing as a hiker or something would be great. Can get a vest and maybe a SMG/Long weapon in one of the big backpacks then :D

  16. Yeah that's correct, for now backpacks are excluded, trying to keep the number of checks down for performance. As long as you've defined CIV_F in the safe faction uniform list that should work. I'm open to suggestions on the distance checks, I put them in because otherwise with ACE, you can just walk up to enemy soldiers and plant explosive charges in the middle of them, which makes things less fun. I'll revisit this over time though.

  17. Now up on GitHub with an experimental Intel spawning script too.

  18. Can you (again) describe the intended use and features of the Intel script? And possibly how you personally use it with the Intel script?

  19. Yeah, it's basically just an updated version of the intel script that was posted on this forum a while back (you requested it I think!). So units drop intel items when they are killed.

    This time around they not only drop intel revealing locations of installations, but also drop phones and radios that you can hack into and track contacts on the map.

    Usage should be pretty self explanatory I guess?

  20. Nice! I'm really looking forward to experimenting with all this. I've been a bit busy with some other Arma projects lately but I can't wait!

  21. I assume the intel is for tracking Assymetrical actors? It wouldn't work in regards to any other type of force?

  22. Newer ›
 

or Sign Up to reply!