recruit AI

  1. ‹ Older
  2. 9 years ago

    Tested your script on takistan, and in preview in sp editor, they spawn as usual, but when i play on my dedi, they spawn 6.5 km from the airbase, no matter what i do. Do you have any idea whats going on? On altis/stratis it works ok

  3. Edited 9 years ago by SpyderBlack723

    Lol.. interesting issue. Haven't actually tested it in MP as it was something I just made really quick. No clue why it would be spawning them far away only on Takistan.

    Anyway, I made a few modifications to it and am now spawning the unit on the server so I'll have to switch it so that it spawns at the location of the object it's attached to and not the player. This should fix any issues it might've had. Will let you know once I get it updated (should be sometime today, not too long).

  4. ok sounds good. Don't rush it, we can wait:-)

  5. Edited 9 years ago by SpyderBlack723

    Alright try this version:

    https://github.com/SpyderBlack723/SpyderRecruitment

    Tested on my dedicated server and all appears to be working fine.

    .. forgot my example mission was set on takistan, should probably change that to a vanilla map.... maybe later :)

  6. Thanks, its working! :-)

  7. Warning Message: Resource Spyder_GearSelector not found

    Where i find one?

  8. You shouldn't be getting that error from this script set. Are you getting this on an existing mission or the example mission?

  9. example mission

  10. Edited 9 years ago by SpyderBlack723

    The ExampleMission was out of date.

    The error was caused if you used an action on the crate that wasn't supposed to be left in the mission, no effect on the script itself.

    Example mission updated:
    https://github.com/SpyderBlack723/SpyderRecruitment

  11. Hey. Love the script. Would it be possible to convert it into giving you a group rather than single units? It would probably have to assume that your player was the squad leader and not spawn in the corresponding unit from that group.

  12. Edited 9 years ago by SpyderBlack723

    I could add an option that allows you to switch between being able to recruit single units and entire groups. The only issue is that not all modded factions have the same method for defining their groups. This could lead some factions to work fine while others wouldn't function at all. I'll look into it.

    Edit: Looked into it a bit further. I think I can only get it working for modded factions that have groups defined the same way as BIS. Not sure if it's worth it. Either way, a task for another day.

  13. OK. Thanks for looking into it!

  14. thanks spyder for your help. If you want to make custom factions to work, you can ask dev team for the script for reinforcment from the player logistic module. rhs is working fine this way, i have not tried the others though. And if some factions don't work, players need to recruit single units. What do you think?

  15. Edited 9 years ago by SpyderBlack723

    The problem is, they made it work with ALiVE, but they did not do a full remap of the RHS groups (no need to in the scope of ALiVE). And the code they used to make it work with ALiVE won't work it's magic here unfortunately.

    If only RHS mapped their groups the same way BIS did :\

  16. Ok thats a shame, either way you can spawn induvidual units, so you can create a group based on mission requirements, and that is over all the best solution. Btw am starting to get my mission ready for alpha release, thanks to you for your awesome help With recruit script and tactical command, and i might ask you for more. My plan is to have a massive convensional war on altis between us army and usmc fighting in a joint opperation againts russian motorrifle troops and Airborne troops, i want this to fairy long and realistic fight, and it will be designed mainly for soloplay. With a mix of task generated by oppcom and custom tasks,++++. Right now am testing performance to get a lot of ai as possible but still remaining smooth performance, stay tuned!

  17. Edited 9 years ago by SpyderBlack723

    Interesting! Keep us posted. Currently back to making my own mission myself, which I haven't done in a long time

  18. Edited 9 years ago by Brawler

    Hey spyder, i had to drop one big mission, and i will redo it with several parts insted, its simply too big for a normal pc to handle. So i want to have smaller contested areas and auto tasks. Mission will end when the forcepool is 0. Can i add a win/lose trigger that detect when forcepool is 0? So when russians are out. Mission will be succeeded. And when us is 0, mission will fail. I have looked trough functions wiewer. But i cant find that function. Is this possible?

    Thanks in advance

  19. Edited 9 years ago by SpyderBlack723

    // example: get the global force pool count for the BLU_F faction _currentBLUFORForcepool = [ALIVE_globalForcePool,"BLU_F"] call ALIVE_fnc_hashGet;

    Yeah there is a function on the wiki that you can use coupled with like a waitUntil or trigger in order to end the mission. I can try to write something up when I get home but if you want to have a go yourself you can look above ( on mobile atm so cant put in code box, sorry).

    A side note: I'm gonna leave the unit spawner how it is right now. I don't have the time to worry about implementing group spawning and there might just be an ALiVE feature built in to spawn units in the future (other than player logistics).

  20. Edited 9 years ago by SpyderBlack723

    Ok, assuming I didn't make any errors while writing this, one way you could do it would be this

    _factionPlayer = "";
    _factionEnemy = "";
    
    waitUntil {sleep 20;(
    	(([ALIVE_globalForcePool,_factionPlayer] call ALIVE_fnc_hashGet) == 0) or
    		{(([ALIVE_globalForcePool,_factionEnemy] call ALIVE_fnc_hashGet) == 0)
    })};
    
    if (([ALIVE_globalForcePool,_factionPlayer] call ALIVE_fnc_hashGet) == 0) then {
    	["Lost"] call BIS_fnc_endMissionServer;
    } else {
    	["Won"] call BIS_fnc_endMissionServer;
    };

    All you would have to do is execute this in a scheduled environment (spawn,execVM) since the waitUntil suspends the script and fill in the _factionPlayer and _factionEnemy lines. You would put the player's faction in the _factionPlayer and the enemy faction in _factionEnemy
    ex:

    _factionPlayer = "BLU_F";
    _factionEnemy = "OPF_F";
  21. Hey spyder, have you removed your reqruit script from github? My harddrive broke down a couple of months ago, and i did not have a backup. Can you please give me a new link?

  22. Newer ›
 

or Sign Up to reply!