Jump to content
JVez

Is it possible to create a playable ai in multiplayer?

Recommended Posts

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

 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
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
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

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

 

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

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

 

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

D222942604767EABE321CD02E76A283BAC716B30

 

3CC7FB4B978665FA2A57D713D19793717DE7A8AF

 

 

 

 

I would like to create a STR FPS with mod IFA3.

 

 

The conflict zone :

 

68EF8295538AFA9D157BB9026DDE22ACF5DB0E43

 

 

German Infantry Army:

8CF67F9F4B7F90FD3640AFAC9D7813C6EFD565C9

 

 

Russian Infantry Army:

380FEC24EE00126E4C97E2991E289A1520862E17

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×