Pause/place military or civilian placement module

  1. ‹ Older
  2. 7 years ago

    I thought that changing the global force pool only effected the military logistics level. For example, you could have an objective module with 100 profiles, military logistics set to 100, change the global force pool to 1000, and increase the number of replacements the OPCOM has, but it won't place 1000 profiles.

    I want more placement. For example you start with 100 profiles, then capture an area that gives you 100 more profiles to work with, for a total of 200 profiles on the map, not just available for replacement.

    I understand I can add an objective easily with the script snippets, thus allowing the OPCOM to prioritize areas it did not before, but is there a way to actually get more units placed/profiled? Not just available for logistical purposes, but to spawn more units.

  3. Just thought of a possible workaround patpowercat; you could place a load of units off on one corner of the map with simulation etc disabled for performance and on a trigger have ALiVE profile all unprofiled units (excluding the units you don't want to profile with a script in their init), thus adding them to the OPCOM force pool. Might increase the amount of BCRs too?

    Would be much easier and less performance costly to unpause an individual module if that was on option though.

  4. It would be much easier to just create profiles instead of a placement module (which would also eventually run the objective count in the mission super.

  5. Ah yes, of course it would! Ignore my suggestion. Forgot you could do that.

  6. Friznit

    22 Jul 2016 Administrator

    Yep, the first script snippet on our wiki is for creating new groups and profiling them.

  7. Just so I make sure my little brain is understanding all this:

    1. The first script snippet you mention Friznit, save it as fnc_spawnProfileGroup.sqf
    2. Add to my init.sqf: ALIVE_spawnProfileGroup = compile (preprocessFileLineNumbers "fnc_spawnProfileGroup.sqf");
    3. Have trigger or whatever and set up the array as in the example snippet.

    My question is however: at what point are the groups profiled? When they get to their destination waypoint marker? Or are they profiled as soon as they spawn?

    Second question: This seems great for a single group or small team, but what if I wanted to add another 100 profiles? Just lot's of writing in groups?

  8. They are profiled at spawn.

    Second question: This seems great for a single group or small team, but what if I wanted to add another 100 profiles? Just lot's of writing in groups?

    Look in x_lib\config for configGetRandomGroups

    Just have a for loop that spawns 50 - 100 groups, each one with a randomly selected group.

  9. Look in x_lib\config for configGetRandomGroups

    Wut? We may both be speaking english, but I have no clue what you're saying.

  10. Go into the functions view in Editor, select configFile in the first dropdown, then Select ALiVE in the second, then x_lib in the third. Scroll down the list and you should see configGetRandomGroup. This will give you the function that you can use to spawn in new groups. Give me a bit and I'll try to work out how (I'm still not very well versed in all this)!

  11. Edited 7 years ago by incontinenetia

    Okay, so you can call ALIVE_fnc_configGetRandomGroup and have that populate group names instead of typing them all out individually.

    So you can make a local variable, say something like _randomGroup and use that to populate group name instead.

    So in your trigger you could have (I think, like I said, very new to this!!):

    _randomGroup = ["Infantry","OPF_F"] call ALIVE_fnc_configGetRandomGroup; 
    [getMarkerPos "MarkerSpawn", false, getMarkerPos  "MarkerDestination", "_randomGroup", "OPF_F"] call ALIVE_spawnProfileGroup;

    Could someone a bit brighter than me verify that I'm not talking out of my arse here?

  12. Correct ^

  13. Well that's great news!

  14. So I can't get the random group to work. I am able to get groups that I specify to spawn as instructed by the script.

  15. Did you use the exact script snippet from above?

    If so then try this instead, there was a small typo

    _randomGroup = ["Infantry","OPF_F"] call ALIVE_fnc_configGetRandomGroup; 
    [getMarkerPos "MarkerSpawn", false, getMarkerPos  "MarkerDestination", _randomGroup, "OPF_F"] call ALIVE_spawnProfileGroup;
  16. Edited 7 years ago by patpowercat

    No dice. Without the quotations around _randomGroup I cannot use the ALIVE_spawnProfileGroup. When I do use quotes, nothing spawns.

  17. Edited 7 years ago by SpyderBlack723

    Try this instead, uses a different function

    _randomGroup = ["Infantry","BLU_F"] call ALIVE_fnc_configGetRandomGroup; 
    _profiles = [_randomGroup, getPosATL player, random 360, true, "BLU_F"] call ALIVE_fnc_createProfilesFromGroupConfig;

    Make sure the ALiVE required and Virtual AI System modules are placed

  18. Still nothing. Still get the error about local variable in global space when placing _randomGroup and not "_randomGroup".

    Only the original script specifying a specific group works for me. Oh well, thank you so much for the effort!

  19. Try having the trigger execute a file instead of simply running the code inside the onAct field. This will fix the local variable in global space issue.

  20. Thanks for the suggestion. Will try when I finally get off this week of work.

  21. Works when executing an .sqf. Thanks!

 

or Sign Up to reply!