drunken officer 18 Posted August 29, 2011 Hi guys I need a buildingPos in my house. Because the KI have to spawn there. I create one point in my memory-lod, called "buildingPos 1". But when i try it in the editor "this setPos [revier buildingPos 1];" nothing happends. Can somebody explane me, how to create a building postion? Thx Share this post Link to post Share on other sites
[aps]gnat 28 Posted August 30, 2011 First tip, dont have spaces in your named point, can cause issues. Use "buildingPos_1" or "buildingPos1" Second, I think the command is; this setpos (_building modeltoworld (_building selectionposition "buildingPos1")); Share this post Link to post Share on other sites
mondkalb 1087 Posted September 1, 2011 All 'rong! :cool: Here is how you do it in O2. Create a Paths-LOD. Now create small triangles all over the place. (Copypasta... :rolleyes:). The entrance points need to be named in1, in2,... Each entrance/exit gets its own in# selection. Connect each triangle the way you seem fit. The AI will follow the face-outline ingame. Even through walls and anything you tell it to go through. To define building postions, you have to select just one single vertice at a time, and name it pos#. i.e. pos1, pos2, pos3, pos10, pos100. You get the idea. Each vertice needs a unique selection name. So here: No copypasta. Now, here a picture to illustrate the above. Pictures usually tell it better than my words. About the piece of code: If it is an editor placed object, run this: this setPos (yourEditorPlacedBuildingName buildingPos (floor random 25)) ditch the floor-random part if you don't want the unit to be randomly placed in one of the first 25 building positions. If it is an object in an island, run this: this setPos ((nearestBuilding this) buildingPos (floor random 25)) Share this post Link to post Share on other sites
drunken officer 18 Posted September 2, 2011 thx again Mondkalb. I'll try it soon Share this post Link to post Share on other sites