JVez 2 Posted June 4, 2018 Good evening everyone. I would like to know if it is possible to create an AI playable. The player can integrated after their death. The AI will be created with an action. I searched but found nothing relevant on the subject. can someone help me find a solution? Share this post Link to post Share on other sites
pierremgi 4737 Posted June 4, 2018 In MP, I'm not sure you can. All playables units are defined at start, for lobby, some slots can be reserved. You can work around a respawn solution like respawn in group, side, change your loadout and your trait.... Share this post Link to post Share on other sites
beno_83au 1362 Posted June 4, 2018 Try addSwitchableUnit Share this post Link to post Share on other sites
pierremgi 4737 Posted June 4, 2018 Just now, beno_83au said: Try addSwitchableUnit Work in SP only. Share this post Link to post Share on other sites
beno_83au 1362 Posted June 4, 2018 Just now, pierremgi said: Work in SP only. Holy cow. And right at the end of the description. I even read it twice to be sure because i thought there might be some restrictions with MP. Share this post Link to post Share on other sites
pierremgi 4737 Posted June 4, 2018 1 minute ago, beno_83au said: Holy cow. And right at the end of the description. I even read it twice to be sure because i thought there might be some restrictions with MP. I did the same mistake sometimes ago. I just lost more time. Share this post Link to post Share on other sites
HazJ 1288 Posted June 4, 2018 You can do this but you'll have to make a sloppy work-around which includes: UI, createUnit, selectPlayer, etc... Won't be selectable via the lobby though. Share this post Link to post Share on other sites
JVez 2 Posted June 4, 2018 I explain my problem. A player is general 1.The player chosen on a board an army to play. Either between infantry, artillery or tank. When he chooses an army this one spawn in front of him. Players can then choose an AI from among them to replace it. So if I am fine, the units created after the start of the game can not be playable? Share this post Link to post Share on other sites
HazJ 1288 Posted June 4, 2018 I don't understand you...? The method I mentioned above is not recommended. I was just saying it is possible. You can do the above method but depending on what you want, it may not be worth the time/effort. Usually for that method above it is for changing complete classes/roles which is kinda pointless now since there is setUnitTrait command, etc... It sounds like you have group leaders and want them to command AI? Why not just use some AI Recruitment script instead? Share this post Link to post Share on other sites
JVez 2 Posted June 4, 2018 sorry but i do not speak english so i use a translator ... i will try to explain what i want. I have two general. A blufor and an opfor. The generals can at the beginning of the game choose an army on a board using an add action. The general: germancommander The board : germanCaptainset The add action starts a script. germanCaptainset addAction ["Infantry Commander", "germaninfantrycommander.sqf",nil,1.5,true,true,"","str _this == 'germancommander'",5]; The script : germaninfantrycommander.sqf deleteVehicle germanCaptainset; deleteVehicle germanexclam; player setUnitLoadout "LIB_GER_scout_unterofficer"; "LIB_GER_scout_unterofficer" createUnit [getMarkerPos "Germanzone9", group player]; _rifleman1v = [getMarkerPos "Germanzone1", side player, ["LIB_GER_unterofficer", "LIB_GER_rifleman", "LIB_GER_medic", "LIB_GER_AT_grenadier", "LIB_GER_rifleman", "LIB_GER_rifleman", "LIB_GER_rifleman", "LIB_GER_rifleman"]] call BIS_fnc_spawnGroup; player hcSetGroup [_rifleman1v]; _rifleman1v setGroupId ["Rifleman 1"]; _rifleman2v = [getMarkerPos "Germanzone2", side player, ["LIB_GER_unterofficer", "LIB_GER_rifleman", "LIB_GER_medic", "LIB_GER_AT_grenadier", "LIB_GER_rifleman", "LIB_GER_rifleman", "LIB_GER_rifleman", "LIB_GER_rifleman"]] call BIS_fnc_spawnGroup; player hcSetGroup [_rifleman2v]; _rifleman2v setGroupId ["Rifleman 2"]; _rifleman3v = [getMarkerPos "Germanzone3", side player, ["LIB_GER_unterofficer", "LIB_GER_rifleman", "LIB_GER_medic", "LIB_GER_AT_grenadier", "LIB_GER_rifleman", "LIB_GER_rifleman", "LIB_GER_rifleman", "LIB_GER_rifleman"]] call BIS_fnc_spawnGroup; player hcSetGroup [_rifleman3v]; _rifleman3v setGroupId ["Rifleman 3"]; [getMarkerPos "Germanzone4", 292.059, "LIB_PzKpfwIV_H_tarn51c", side player] call BIS_fnc_spawnVehicle params[ "_veh", "_crew", "_group1v" ]; player hcSetGroup [_group1v]; _group1v setGroupId ["Panzer IV A"]; _heavyinfantryv = [getMarkerPos "Germanzone5", side player, ["LIB_GER_unterofficer", "LIB_GER_stggunner", "LIB_GER_smgunner", "LIB_GER_smgunner", "LIB_GER_smgunner"]] call BIS_fnc_spawnGroup; player hcSetGroup [_heavyinfantryv]; _heavyinfantryv setGroupId ["Heavy Infantry"]; _antitankv = [getMarkerPos "Germanzone6", side player, ["LIB_GER_unterofficer", "LIB_GER_smgunner", "LIB_GER_smgunner", "LIB_GER_AT_soldier", "LIB_GER_AT_soldier"]] call BIS_fnc_spawnGroup; player hcSetGroup [_antitankv]; _antitankv setGroupId ["Anti-Tank Infantry"]; _machingunnerv = [getMarkerPos "Germanzone7", side player, ["LIB_GER_unterofficer", "LIB_GER_mgunner", "LIB_GER_smgunner", "LIB_GER_rifleman"]] call BIS_fnc_spawnGroup; player hcSetGroup [_machingunnerv]; _machingunnerv setGroupId ["Machin Gunner"]; _sniperv = [getMarkerPos "Germanzone8", side player, ["LIB_GER_scout_sniper", "LIB_GER_scout_sniper"]] call BIS_fnc_spawnGroup; player hcSetGroup [_sniperv]; _sniperv setGroupId ["Sniper"]; Groups are added to the high command that is the player. So if I want the rest of the players to take possession of an AI I can not make them spawn like that. The only solution will be that these AI is already present at the beginning of the game? Share this post Link to post Share on other sites
JVez 2 Posted June 4, 2018 I would like to create a STR FPS with mod IFA3. The conflict zone : German Infantry Army: Russian Infantry Army: 1 Share this post Link to post Share on other sites