Jump to content
Sign in to follow this  
Guderian

Spawn patrols randomly..

Recommended Posts

Searched, but couldnt find what I want, but must be easy regarding the replies in a lot of threads.

But I can't, maybe some guru can help.

I want to have respawn a dozen groups of lets say 4 rebels, or resistance men randomly and they patrol around a huge area.

If they have been killed, they respawn on a random different part of the map and start over again.

How easily can this be done ?

Share this post


Link to post
Share on other sites

UPSMon script can do that. Or simple waypoints with huge areas of completion, but that won't allow for respawn. Why do you have random units everywhere though? :)

Share this post


Link to post
Share on other sites

Search "Upsmon" and look for "DAC" while your at it...

Ninjed, though I believe upsmon does have respawn.

Share this post


Link to post
Share on other sites

I saw DAC and UPSMON, but I need a lightweighted, maybe dumb script.

The reason I want random patrol groups is for the mission I am adjusting to our group needs.

So it must be easy, if you know how to do this... but how ?

---------- Post added at 08:56 PM ---------- Previous post was at 08:47 PM ----------

BTW, Kylania you have a nice site with a lot of usefull information!

Share this post


Link to post
Share on other sites

Hi.... the reason the guys made those suggestions is because it really is not that easy. Quite a lot comes into it.

Just some of the issues might be...

Spawning in water.

Spawning in plain sight of players.

Spawning right next to enemy.

You could try reading up on these... don't use them myself but they may work just right for you. Make sure you have a Functions Module placed on the map.

BIS_fnc_spawnGroup

BIS_fnc_taskDefend

BIS_fnc_taskPatrol

Regarding respawing... have a look at this. This was a test mission I did for someone at some point. It may also help.

EDIT: I should have included this also...

For finding random points.. maybe something like this....

_centerpos = getpos [b][i]some_object[/i][/b];
_amnt = 50;
_maxdis = 1000;

_ptarray = [];

for "_i" from 1 to _amnt do {
_dis = random _maxdis;
_ang = random 360;
_pt = [(_centerpos select 0) + sin(_ang)*_dis,(_centerpos select 1) + cos(_ang)*_dis];
[b]_ptarray[/b] set [count _array,_pt];
};

_ptarray will contain a list of random points up to 1000m away from some_object... but some points might be in water or on buildings etc.. which will not be ideal.

Edited by twirly
Clarity

Share this post


Link to post
Share on other sites

Thanks for your scripts and suggestions. Will try it now.

For me its not important that the spawned units die, as they will respawn soon again some where else.

---------- Post added at 07:06 PM ---------- Previous post was at 06:06 PM ----------

Pefect for my needs! your script together with the functions is just what I need.

Thanks a lot.

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  

×