Mohawk-21VB- 0 Posted November 17, 2008 The quistion may have been asked before, but after searching, page after page in there and not found what I´m looking for I would like to know, how to put the enemy units on the map, but differents places each time I play the mission. It would make it more exciting not to know where the enemy is. (Randomized units) Hope you understands my lack of english. Mohawk out. Share this post Link to post Share on other sites
Taurus 20 Posted November 17, 2008 Hi You can play around with the placement radius in the editor. Or if you spawn them using the createUnit array i.e. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = group player createUnit ["SoldierWB", Position player, ["MyMarker1","MyMarker2",...], 0, "FORM"] I hope this was the answer you were looking for, if not, please ask again. Share this post Link to post Share on other sites
.kju 3244 Posted November 17, 2008 if you place an unit, in the dialog at the very end you have placement radius. the unit will be placed somewhere in that radius. in addition you have probability of presence in percent as well as condition of presence (based on variable values) Share this post Link to post Share on other sites
Mohawk-21VB- 0 Posted November 17, 2008 Thank you so much for your quick reply´s, that was fast. I´ll try it out. Will get back later and tell you guys how it went. Mo out. Share this post Link to post Share on other sites
jakerod 254 Posted November 17, 2008 If you want them to be randomly at one of many different preselected locations you can also use the empty markers. Place 3 'empty' markers (not the circle one the one with the box) Then you can use the group feature and drag a line from the unit to each of the markers. This will make it so that the unit that is grouped to it will appear at any one of the 3 markers that you placed. It helps for snipers because you don't want them to be out in the open. You do want them to be in a good position but you also don't want to know which position they are at when you are playing. You can also place more than 3. I was just using 3 as an exmaple. Share this post Link to post Share on other sites
CarlGustaffa 4 Posted November 18, 2008 Be aware with units ending up in water or steep slopes. The "best" method is to is to create an array of random positions where each position has been checked against water and steep terrain (if applicable). For even better bug 'handling' (?) each new position should be distance checked against other positions in the array before it is added. You would now have an array of positions you could use to both place units in and create waypoints from that are a lot more safe than the usual ways. For fail-safe, used positions could be removed from the array (making sure no vehicle are spawned on top of eachother), just make sure to reduce the random select counter accordingly. This may take some time to finish though depending on the slopyness and closeness of water. Off course, try the simpler solutions first. If they work out ok, then go for it. If things starts to fall apart, you miht have to look into scripting to avoid problems. Share this post Link to post Share on other sites
Mohawk-21VB- 0 Posted November 20, 2008 Thank you all, it´s working fine and very simple. Made my first mission with randomized units and a lot more exciting driving on the island, and not know where the enemy is...having a heartattack when the enemy begins to shot at me/us...CHRIST!! There they are!!   Thx again.  My next project is how to make a movie...something more complicated.   Share this post Link to post Share on other sites