Kolmain 6 Posted May 5, 2011 Im trying to create a script that will spawn a high ranking officer inside a "villa" across the map of Lingor. First, how can I create an array of the locations of all positions of villas on the map? Next, I don't understand how to gather information from an AI and be able to format text to display their name. I will need to create a task explaining who they are. Finally, the defenses aren't too hard, just some find safe pos's? Share this post Link to post Share on other sites
MeIvin 10 Posted May 5, 2011 Hello Kolmain, check this out: http://forums.bistudio.com/showthread.php?t=113641 Should be a solution for your array problem :) Kind Regards Melvin Share this post Link to post Share on other sites
Kolmain 6 Posted May 5, 2011 Thanks, but I'm trying to limit it to villa-mansions only across the whole island :( Share this post Link to post Share on other sites
Muzzleflash 111 Posted May 5, 2011 (edited) To get all of the houses of that type do this: _mansions = [0,0,0] nearObjects ["MyMansionClassName", 30000]; If you don't know the classname of the house, go in the editor place yourself on top of the building. Drop this in your init: copyToClipboard str(typeOf (nearestBuilding player)); Then just Alt-Tab out and paste it in. To get a single random mansion: _specialMansion = _mansions select (floor (random (count _mansions))); To get the name of an AI try 'name': _aiName = name MyAIUnit; hint format ["The AI's name is %1\nHe's happy", _aiName]; Edited May 5, 2011 by Muzzleflash Share this post Link to post Share on other sites
MeIvin 10 Posted May 5, 2011 Thanks, but I'm trying to limit it to villa-mansions only across the whole island :( Hello, I don't understand, what are you trying to limit it to? From what I understand you want to spawn a guy in either a random location, or you want to spawn several guys at several locations. In which case I don't see the limitations with the solution I gave you. If you know the locations you want him to be spawned, and want it in an array, walk around on the map and find the exact positions you want him to spawn using the method described in the link (it will in fact create an array with the positions you want for you!). (You do have to do some work though in removing the random part if you don't want it to be random.) Or do you want to spawn a house as well? if so you can get the class name from a list here: http://www.armatechsquad.com/ArmA2Class/ or just do what Muzzle suggests. Kind Regards Melvin Share this post Link to post Share on other sites