Jump to content
Sign in to follow this  
Uncle Imshi

Respawn at exact location.

Recommended Posts

Hi,

I've been trying for a couple of days now to figure out or find a means of having AI respawn in exact positions and setunitpos - the idea is for a training misison where you can just repopulate the occupied positions as if they were pop up targets but with a two way range.

Basically I'm trying to have a script that will on a trigger activation create the new units on a marker.

This is for use on a dedicated server.

Share this post


Link to post
Share on other sites

Have an array with following info: unit class, position, unitpos. Like:

[["RU_Soldier",pos1,"MIDDLE"],["RU_Soldier_MG",pos2,"DOWN"],["RU_Soldier",pos3,"DOWN"]]

Then just loop through that list when trigger is used, createunit + setpos + setunitpos.

Position can be done many ways, marker, invis hpad etc.

If it's going to be used alot, make the loop add the created unit into an array that will get looped when trigger is called and each one is deletevehicled. That way there won't be too many bodies around.

That's just first way that came to my mind, there are probably better ones around.

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  

×