**********************************************
***  Random Building Position Script v1.0  ***
***       by Tophe of stgta Ops          ***
***               070205                   ***
**********************************************


This is a very short and simple script. 
But for those that are new to scripting this might come in handy.
It is pretty much the first proper script I have ever done for ArmA or OFP.

This script will find the closest building of a unit and put it in a random position inside.
Good for making dynamic missions.



Place a unit close to a building (or on it) and put:  

[this] exec "buildingPos.sqs"  

in the INIT FIELD of the unit.



The script will then check what building is closest, count the number of available 
position in the building and then randomly put the unit at one of them.

Easy eh?




If you increase the Placement Radius of the unit, to cover several building you can
also make the unit pick a random building, 

You can init the script on several units.

You could, for example, put 20 units with Placement Radius covering a whole town 
and Probability of Presence to 50%. Then there is a chance that there is between
0 and 20 units in random positions inside random houses over the whole town.

I included a mission with a few preset units.


I hope this will be useful for someone.
Eventually I might try making a house patrol script.


Everything I have learned so far has been by the help of the biki
http://community.bistudio.com/wiki/
And by the kind help of the people at the BI Forums so credit to them.





Would be nice to be mentioned if you use this tiny script.

// Tophe of stgta Ops, harlechin@hotmail.com

 













