Jump to content
Sign in to follow this  
Drinker

No ai respawn

Recommended Posts

Hi!

I need help with preventing the AI units to respawn. I need the "playable" units but if they are not players, they shouldn't respawn. I tried in various ways but none of them is 100% reliable. Respawn type is "base".

Does anybody have a "simple" solution to this?

thx

Share this post


Link to post
Share on other sites

You could have a trigger that counts all the players on what side, so if east sides players are <=0 then

"respawn_east" setmarkerpos [0,0,0]

smile_o.gif

Share this post


Link to post
Share on other sites

No, it won't work.

Players need to respawn multiple times, only the AI "playable" units shouldn't respawn. It's useless if i count the number of players for each side as it has nothing to do with my problem.

Also the number of "playable" AI will rarely be 0 - only if all of them die at nearly same time.

Share this post


Link to post
Share on other sites

There is no way that I know of to "stop" them from spawning, so with a count triggers that count PLAYERS in thislist or something, and if its equal to 0, then move the spawnmarker for AI to [0,0,1000000000000000000000] so you wont see them.

Don't you just not want them to be able to shoot you ect when they spawn? gah.

Share this post


Link to post
Share on other sites

Try using deletevehicle on them once they have spawned a second time. If its AI, OFP will delete them, if there players nothing will happen.

Well at least thats the theory.

Share this post


Link to post
Share on other sites

the problem is how can i recognize which units have already died and respawned;

i get an array of already dead units, then i check if any of them is alive again

the problem is that when a unit is alive again - it will not be in that array, the array won't refer to the respawned unit but to the dead body - objNull

so i got an array of objNulls and no array with respawned units

now i'm trying to solve this problem using units names in array - does anybody know if it can happen that more than 1 units have exactly the same name?

Share this post


Link to post
Share on other sites

Why not just set teh repsawn marker for teh team with no players to [0,0,0] like I said?

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
Sign in to follow this  

×