Jump to content

Sarge

Member
  • Content Count

    25
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by Sarge


  1. Gents,

    ran into a problem the other day.

    Take the following scenario (all scripted, no editor / manual commands)

    Chernarus, Devils castle.

    A group of 10 AI spawned in the middle of the castle.

    I am checking the available buildings, and for these am checking the predefined positions in the buildings.

    Now i issue a "domove" for all my AI to get into these building positions.

    The problem here is: There are some walls in Devils castle, that have predefined positions, but these can not be reached (not unless in flight).

    The AI is trying to get to these positions, and fails - which leads to error messages in the rpt like:

    Out of path-planning region for R 1-1-B:1 (SAR_leader_2) at 2010.0,11727.2, node type

    Error R 1-1-B:1 (SAR_leader_2): Invalid path from [2008.35, 246.92, 11727.00] to [1975.49, 245.53, 11803.27].

    The REAL issue now is, that IF this happens, the whole group gets stuck, no movement nothing.

    Questions:

    a) is there ANY functionality to check the validity of a path ?

    b) would a possible solution be to issue "moveto", and check for "movetofailed" or "movetocompleted" ?

    c) are there any possibilities to influence / query / adjust the pathfinding logic in Arma2OA ?

    Thx for a feedback, searched a while for similar issues but seems not many have run into this.

    Sarge


  2. what you want is kindof a reputation system with the factions.

    i would go for:

    - store bluefor and opfor kills on your character

    - based on that information, set your player to east or west

    the in-built rating system will not help you with what you want to achieve.

    The above solution demands a couple of things though, like e.g. if you ARE east, and shoot an east AI, ARMA lowers your rating, and by that at some point you are switched over to side enemy automatically. afaik rating doesnt get reset when you switch sides via a group join (untested), so you might need to implement a logic for that as well.

    Sarge


  3. Has anyone had issues using this script in a dedicated server environment? I don't find any mention/discussion of it here.

    I am cobbling together a randomized IED/ambush system using this script to get road positions. It works flawlessly in editor preview and hosted environments, but not in dedi - all manner of screwy things are happening. Details in my topic here: Adding-a-condition-to-a-forEach-system, but again, I'm really just looking for confirmation that SHK_pos works on dedi and that I am doing something wrong.

    Works like a charm here. Running a fully fledged AI system that is 100% dedicated serverside.

    Sarge


  4. if you think your fixes are good then you really should slap it on devheaven as UPSMON fork ...

    I will need to look into this one. UPSMON (the adjusted version) is part of my AI framework (dynamic & static spawning of AI, based on a grid setup), and due to that relies on some other stuff in that fw.

    What i did fix/reimplement is:

    - optimized/implemented it to be run on dedicated servers only.

    - ability to remove a group from upsmon

    - ability to suspend upsmon for a group as long as needed

    - fixed the respawn logic (loadouts/ehs, removed the "inverting area coordinates" functionality etc.)

    - fixed a couple of bugs, cleaned up

    To make it clear - i don't intend to bash on the original script, without it a lot of people wouldn't have had the fun they had with AI.

    Let me see what the future and my time will bring, eventually i will take it on to host a new version on github, can't promise anything though.

    Thx & cheers, Sarge


  5. You're using a nested array and not selecting it properly. Think of it like this. _kitArray equals the following:

    _kitarray = [["AK_107_kobra", "30Rnd_545x39_AK"],["SVD", "10Rnd_762x54_SVD"],["RPK_74", "75Rnd_545x39_RPK"]]; 
    

    Now let's say the randomization gets 0, so you select 0. Now _kitArray is essentially this:

    _kitArray = [["AK_107_kobra", "30Rnd_545x39_AK"]];
    

    Another select 0 wouldn't worl because you'd just keep selecting the nested array. The workaround here is to use another select in conjunction with the first select, like this:

    _kitArray = [["AK_107_kobra", "30Rnd_545x39_AK"]];
    _kit = (_kitArray select 0) select (floor(random(count _kitArray)));
    

    This should select the first array in _kitArray (which is the nested array) and then proceed to select a random entity out of that. You might have to do the randomization in another variable though as _kitArray essentially equals 0 (due to 1 nested array present).

    I may be totally wrong, BUT

    _kitarray = [["AK_107_kobra", "30Rnd_545x39_AK"],["SVD", "10Rnd_762x54_SVD"],["RPK_74", "75Rnd_545x39_RPK"]]; 
    
    _kit = _kitarray select 0;
    

    Then _kit IS

    ["AK_107_kobra", "30Rnd_545x39_AK"]
    

    and not

     
    [["AK_107_kobra", "30Rnd_545x39_AK"]]
    

    Sarge, happy to be corrected if the above is wrong.


  6. If there is no maintainer left, maybe start a project on devhaven ?

    Tbh i don't have the time for it. By now i heavily modded UPSMON, fixed a ton of bugs in there (try to run the UPSMON files through squint - you will have a real laugh ...), and have it mostly doing what i want.

    What i need to say is that the original UPS from Kronzky is a splendid piece of code ... It's the MON that is severely screwed up.

    cheers

    Sarge


  7. I am seeing this behaviour in A3 although I did reference the empty group earlier in A2. And it seemed to be working.

    It is working now.

    See the following script:

    _grp = createGroup west;
    _grp createUnit ["USMC_Soldier" , getPos player, [], 5,"FORM"];
    
    player sidechat str _grp;
    
    waitUntil{sleep 0.1; {alive _x} count units _grp == 0};
    
    player sidechat "alldead- "+str _grp;
    
    sleep 5;
    
    _grp createUnit ["USMC_Soldier" , getPos player, [], 5,"FORM"];
    
    player sidechat "fresh- "+str _grp;

    Works all right, group is recycleable.

    Only as long as you have stored the group object somewhere. Try to address that group via allgroups ....


  8. Yet another but this time hybrid A2 A3 syntax highlighter for Notepad ++ http://killzonekid.com/arma-2-arma-3-hybrid-syntax-highlighter-for-notepad/

    Did you manage to implement the folding feature ? Planning it ? What about function references in Notepad++? Planned ?

    reason i ask is is still use the very old Arma Script recoded plugin, which has all these nifty features, and a bit more, but is lacking in the AR;A 3 new commands section :-)

    cheers

    Sarge


  9. solution: use setidentity and define classes that have speaker set to "novoice".

    example:

    class CfgIdentities {

    class id_SAR {

    name = "Rincewind";

    face = "Face85";

    glasses = "None";

    speaker = "NoVoice";

    pitch = 1.00;

    };

    class id_SAR_band : id_SAR {

    name = "Cohen the Barbarian";

    face = "Face101";

    };

    class id_SAR_sold_lead : id_SAR {

    name = "Sarge";

    face = "Face89";

    glasses = "BlackSun";

    };

    class id_SAR_sold_man : id_SAR {

    face = "Face66";

    };

    class id_SAR_surv_lead : id_SAR {

    name = "Max Hero";

    face = "Face04_baf";

    glasses = "Sunglasses";

    };

    class id_SAR_surv_man : id_SAR {

    name = "John Bambi";

    face = "Face02";

    };

    };


  10. same question here, and i am working on Arma 2 - so the behaviour there is the same - i create an empty group, and this is available until i first move a unit into it. as soon as i remove the unit, the group is nulled.

    Would really like to learn how to keep groups alive that had units once. It is so much more convenient to reuse groups than having to generate a new one every single time.


  11. Might be worth to mention here that the game DOES make the group a nul group when all units have been removed. Group is still existing, but cant be addressed anymore by its name.

    count allGroups returns the number of "valid" groups. If you try to access allGroups select (count allGroups), you get a null value, if you try allGroups select ((count allGroups) +1) you get a division by zero.

    I might stand corrected, but that's what my test missions seem to do.

    Anybody knows a way to address an empty group AFTER the last unit left it?


  12. Greetings all,

    Anyone has an alternative for handling the issue that enemy factions cant travel in the same car ?

    Given that enemy factions cant travel in the same vehicle, i tried to find a solution to this.

    My requirements 7 setup:

    - There is one faction side that players can be on (west) - but within that faction, players are distinguished (indians, cowboys and bandits, distinguished by an object variable, very similar to Dayz).

    - AI is on 2 sides - the same as the players (=west = rangers, marshals), and east = bandits.

    - To have the west AI shoot player bandits, i use addrating from a trace function on the AI that checks the object value of the player and uses addrating -x on these to identify bandits.

    - east AI is unfriendly to everyone, so they shoot on sight

    This all works like a charm, the issue comes when my players try to board a coach.

    A group of bandits where the players were traced (and addrated = moved to side = enemy) are not able to travel together.

    A cowboy and a bandit are not able to travel together

    Things i tried:

    a) setcaptive - doesnt work, i want AI rangers to shoot at coaches when a player bandit is in there, as well as AI bandits shoot at a coach regardless of what type of player is in there.

    b) attach a trigger to the coach, which does the following:

    b1) identify any unit approaching or leaving an area around the vehicle

    b1a) maintain a list of all players that are IN the trigger area

    b2) check the rating for this player, store it in a player variable, and set it to 0 (= switch back the player from side enemy to his initial side)

    b3) if a bandit joins the vehicle area as first to approach, generate a group resistance (enemy to west and east), and add the bandit to that group

    b3a) any further player that joins the area will be moved in that group, so in essence a cowboy travelling with a bandit will be in a resistance group.

    -> by this, groups that have at least one player bandit will be engaged by west and east AI when travelling in the vehicle

    b4) if only cowboys join the vehicle area, do nothing, they can travel together and get attacked by bandit AI (east)

    c) if a player leaves the area trigger, restore his rating and check if conditions for the vehicle group still apply to make it a resistance group, if not, switch the players to a west group.

    In theory this sounds like the perfect solution to overcome the travelling in a vehicle problem.

    In reality, the group switch doesnt work.

    even if i greate a nulgroup first and join the player, then let the player join the resistance group, the behaviour of the ARMA engine is somehow unpredictable.

    If i query the side of the player after the resistance group join, sometimes the side is west, sometimes it is resistance ...

    Is there ANY other way to achieve what i described above?

    Adding an action to the coach "get in" and moveToCargo is a potential solution, not sure about this though.

    Anybody found an elegant way around this ? How about the developers of the citylife RPGs ? Domination?

    Thx & cheers

    Sarge


  13. Hi all,

    am stuck on an issue that took some time already, hope for some help here.

    let me explain the situation:

    full MP environment, dedicated server.

    - I got a trigger defined, that fires whenever a player enters or leaves the trigger. Works like a charm.

    - I figure out which player leaves or enters by comparing the triggerlist with a variable that i store on the trigger that holds all players. -> works like a charm as well.

    What i try to do now is that IF a player enters the trigger, i (based on certain conditions) try to switch his side.

    The way i do that is:

                    _trig_grp = createGroup resistance;
                   sleep 1;
    
                   {
                       [_x] joinSilent grpNull;
                       sleep 1;
                       diag_log format["XXXXXXX ----- joined nullGrp -----------: %1",_x];    
                       [_x] joinSilent _trig_grp;
                       diag_log format["XXXXXXX ----- joined %2 -----------: %1",_x,_trig_grp];                        
                       sleep 1;
                   } foreach _trig_unitlist;
    

    In this special example, _trig_unitlist only holds one unit (checked before), so this is only executed on one player.

    if i check the players side after the above with:

                    diag_log format["|||||||||||||||||| player joined group, side of player set to: %1",side _player_joined]; 
                   sleep 1;
                   diag_log format["|||||||||||||||||| player joined group, side of player set to: %1",side _player_joined]; 
                   sleep 1;
                   diag_log format["|||||||||||||||||| player joined group, side of player set to: %1",side (_trig_unitlist select 0)];
                   sleep 1;
                   diag_log format["|||||||||||||||||| player joined group, side of player set to: %1",side _trig_grp];
    

    i do get weird results. _player_joined holds the player object that joined the trigger, _trig_unitlist select 0 is the same, and side _trig_grp shows the side of the defined group.

    What IS weird is, if i reduce / adjust the sleeps, i get different results. In theory, all 4 diags should show the same value. In reality, it looks like this:

    21:26:41 "XXXXXXX ----- joined nullGrp -----------: B 1-1-A:1 (Sarge) REMOTE"
    21:26:41 "XXXXXXX ----- joined R 1-1-A -----------: R 1-1-A:1 (Sarge) REMOTE"
    21:26:42 "|||||||||||||||||| player joined group, side of player set to: WEST"
    21:26:43 "|||||||||||||||||| player joined group, side of player set to: WEST"
    21:26:44 "|||||||||||||||||| player joined group, side of player set to: GUER"
    21:26:45 "|||||||||||||||||| player joined group, side of player set to: GUER"

    These results are NOT consistent, sometimes it works sometimes it doesnt.

    Questions:

    - is there any delay when creating a group and joining a unit before that unit switches it's side to the one of the group?

    - is there a known bug with creategroup / joinsilent ?

    I am looking for a simple way to switch sides for a player, only found the soultion via groups.

    Any help is highly appreciated, if BI reads this, i would welcome a hint.

    cheers

    Sarge


  14. Same question here. I bought the supporter edition, and because of the long waittime for the key i bough the regular edition on steam and activated it.

    I am fine with having 2 versions, might come in handy when hosting a server, BUT:

    atm i havent activated my supporter edition on my steam account - what will happen ? Can i have 2 keys for arma3 on my steam account? Will one get overwritten ?

    Thx for a feedback,

    Sarge


  15. bump - any feedback on this ? Thx & cheers

    quick question - does it support folding code ?

    I use the old Armascript recoded plugin, which has some nifty features besides highlighting - one of em being folding, as well as showing function hints if you mark a function in your code.

    Thx for a feedback

    cheers

    Sarge


  16. Hello everyone,

    new to UPSMON and reading my way through this thread. Can i bother you with a pretty basic question, which nevertheless took me a couple of hours already and i wasnt able to figure it out.

    I think i am missing some very basic understanding of how UPSMON works.

    I am NOT working in the editor, i am directly scripting everything i want my MP mission to achieve.

    Question is a simple one:

    Consider a scenario where i spawn in (while the mission is running) a group of units and a vehicle, add the vehicle to the group, and now want the whole group to move to a certain location AND fortify this location.

    If i try to do this via the normal patrol functionality the team gets where it is supposed to get and starts patrolling that area.

    HOW do i now change them into fortify mode AFTER they have reached their destination? The vehicleinit for the leader is only executed once when creating the unit(if i am right), so i cant override / reset this.

    Thx a lot for helping me out,

    cheers

    Sarge

×