Jump to content
Sign in to follow this  
DanielBourne

Random Enemy Variables in Editor

Recommended Posts

Hi guys,

kinda new to the editor but have read a few guides and some things have worked, but the stuff below i still have trouble with. any help will be amazing :)

1)Random Location of Enemy Basically when I place an enemy in the editor in a town for example, I always put 25-50 Placement Radius. However the enemy always spawns in the exact same place. Is there any way of making him spawn somewhere random in the radius?

2)Random Path of Enemy Ideally, after the enemy unit has spawned in a random area in that radius, I would like for him to randomly move around that radius (not always the same path) so everytime i encounter him, its probable it will be in a new position. How do i do this?

I have learnt how to set his behaviour to Combat, Stealth etc but what confuses me is the waypoint modes. If i want the enemy to move around the radius looking for me, would i set the waypoint mode to "seek and destroy?" .

I appreciate all the input you guys got for this cos this would start me off on making some missions. Thanks for your time!

Daniel.

Share this post


Link to post
Share on other sites

I'm just learning the basics but for what you want I'll show you how I've come to do this simply.

I think what works is if you stick a unit or group down and then group the leader to a few different markers that I'd name random1, random2 and random3 etc.. I think this means that he'll spawn at one of the random locations every time. I'm not sure but I think the unit will always travel to their waypoints thereafter.

The next bit is a yes to 'seek and destroy' for the enemy to search and try and find the enemy, you should set the squads formations and behaviour to different styles at certain points, I then make sure the placement and completion radius of the WP are set to a wider area. You'd also set a timer on the next waypoint so you can create delays between moves. You randomise this further with the ability to set a minimum/medium/maximum timeout. At some point you could create a cycle waypoint to loop what they do if needs be.

There are lots of spawn scripts,a page with a few on armaholic.

Here

You could use the AI respawn group patrol.

I'm actually not that far into it as I'd rather try to learn how to script myself, but am just trying to see where my limits are in the editor. At the moment I'm learning the camera! :D

Share this post


Link to post
Share on other sites

I think you should try Urban Patrol Script (UPS). Using the parameter "RANDOM" will place units randomly within the assigned marker area. If you want the units to not leave marker area use the "NOFOLLOW" parameter. Units will patrol randomly with the marker area.

This script will do all you want and more too, i use it in all missions i make :)

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  

×