Jump to content
Spartan1804

Make AI respawn at a specific respawn point

Recommended Posts

I'm basically looking for a way to make members of a squad respawn at a specific respawn position when there is more than 1 respawn point for the team.

 

Let's say I have 3 respawn points or respawn modules for the BLUFOR team and I want my 1st and 2nd AI squads to only respawn at "respawn_west" (so at the first respawn point). How do I make this possible? I tried to sinc the AI squads to a respawn module, but it didn't work as intended. So I thought that there might be a script that makes the AI squad do that, but I have no idea how I can implement that. I'm fearly new to scripting and I know very little on how to make scripts. 

 

Does anyone have an idea on what I can do?

Share this post


Link to post
Share on other sites

Welcome to Bi forums!
Happy to see you on the forums here as i had suggested in my reply to you on my one video.

 

In this section of the forum is a pinned thread, a compilation for everything AI, in the future aside what your asking here

if there is anything else related to ai functions or things you want to do in your missions it might be on my list seen here

https://forums.bohemia.net/forums/topic/165560-ai-compilation-list-of-addonsmodsscripts-threads-for-arma3/

 

Anyways maybe @pierremgi or another can answer your question as im unable too.

Share this post


Link to post
Share on other sites
6 hours ago, Spartan1804 said:

I'm basically looking for a way to make members of a squad respawn at a specific respawn position when there is more than 1 respawn point for the team.

 

Let's say I have 3 respawn points or respawn modules for the BLUFOR team and I want my 1st and 2nd AI squads to only respawn at "respawn_west" (so at the first respawn point). How do I make this possible? I tried to sinc the AI squads to a respawn module, but it didn't work as intended. So I thought that there might be a script that makes the AI squad do that, but I have no idea how I can implement that. I'm fearly new to scripting and I know very little on how to make scripts. 

 

Does anyone have an idea on what I can do?

 

Welcome on forum.

 

You can teleport your unit like this, if you named a respawn position module respawn_west

 

addMissionEventHandler ["EntityRespawned", {
   params ["_newEntity", "_oldEntity"];
   if (_newEntity in playableUnits) then {_newEntity setpos getPos (allMissionObjects "logic" select {_x getVariable "name" == "respawn_west"} select 0)}
 }];

 

"respawn_west" is not directly the marker name. It's the module name.

Replace the condition _newentity in playableUnits   by the condition you need. Check that this new entity satisfies the condition, of course.

 

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

×