Jump to content
jts_2009

Remove AI occupied by player (Host)

Recommended Posts

Hello. How actually to delete AI occupied by player? Respawn = 0. I saved the game, then I load the game and take another slot and another me (AI) have his presence in the mission. Is there a way to delete him, but let the slot be available..? (I am host player). Or do I have it do aggressively and just run a code when game is loaded from save and delete him? (Probably he won't be available as slot anymore). You have any ideas..? (if it's even possible :3)

 

in Description.ext AI is disabled.

 

disabledAI = 1;

respawn = 0;

 

 

Share this post


Link to post
Share on other sites

If you disable AI in lobby, you just have used slots in game. The other slots doesn't haver "existence", not appearing, not counter as player, even not counted as playableUnits!, not defined even you named them. So lobby seems to me a good place to do what you want. Just check disable AI (general or specific slots)

 

If i'm right, there is no currently workable command to add/remove a slot in MP. Just a project.

 

You can also script with some event handlers:

https://community.bistudio.com/wiki/Arma_3:_Event_Handlers/addMissionEventHandler#HandleDisconnect

 

but especially:

https://community.bistudio.com/wiki/Arma_3:_Event_Handlers/addMissionEventHandler#TeamSwitch

in your case.

Share this post


Link to post
Share on other sites
45 minutes ago, pierremgi said:

If you disable AI in lobby, you just have used slots in game. The other slots doesn't haver "existence", not appearing, not counter as player, even not counted as playableUnits!, not defined even you named them. So lobby seems to me a good place to do what you want. Just check disable AI

 

The problem is that if Host save the game, then load the game but with another slot selected, the slot he have taked first - will be occupied by AI. HandleDisconnect will not work, because it handles "disconnect". In case of Host, Host can't disconnect.

 

45 minutes ago, pierremgi said:

 

In wiki it says this command does nothing in Arma 3.

 

45 minutes ago, pierremgi said:

 

Let's say it's gonna work. I have an event now executed because I switched to another unit. The AI unit is still there. Im not sure if it even will count the "team switch" only because I selected another slot. I have also enableTeamSwitch = 0 in my description.ext

Share this post


Link to post
Share on other sites
1 minute ago, jts_2009 said:

 

The problem is that if Host save the game, then load the game but with another slot selected, the slot he have taked first - will be occupied by AI. HandleDisconnect will not work, because it handles "disconnect". In case of Host, Host can't disconnect.

 

 

In wiki it says this command does nothing in Arma 3.

 

 

Let's say it's gonna work. I have an event now executed because I switched to another unit. The AI unit is still there

You could enableSimulationglobal false  /  hideObjectGlobal true on it ?

Share this post


Link to post
Share on other sites
46 minutes ago, pierremgi said:

You could enableSimulationglobal false  /  hideObjectGlobal true on it ?

 

Probably. But thats exactly that way I want to avoid... :grinning: 

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

×