doc. caliban 34 Posted April 15, 2020 Hello. I'm using invisible markers and the Link > Random Start option to randomly place a hostage in one of several locations. The problem I am having is that markers have no Z axis, so there is no way to place one in a building who's floor isn't pretty much at ground level. Are there any clever workarounds that would let me randomly spawn my hostage in a room on the second floor of a building? I even have problems placing them on the ground level floor of a building if the surface of the floor is very far above the ground itself. Thanks, -Doc EDIT: This is what I've come up with so far. I place the unit where I want it in a building and use the Log menu option of copying the location to the clipboard. I then paste that location array into an array. I add as many position arrays as I want. I then use that array or position arrays in the unit's init field: _array = [[3536.25,19998.9,3.78328],[3533.76,19999.2,3.77739],[3536.17,19995.6,3.80299]]; _hostagePos = selectRandom _array; this setPos _hostagePos; Share this post Link to post Share on other sites
Joe98 92 Posted April 15, 2020 I don't have a solution. I am just thinking aloud! Place 10 chairs on the map. Name the chairs chair0 - chair9 for a total of 10 Name your hostage hostage1 hostage1 setpos getpos chair1 and will always start the mission on chair1 So, you need line something like: hostage1 setpos getpos chair(select a number at random from 0 - 9) I have never found a way to get this to work I also note that chair(1) fails chair{1} fails chair[1] fails So it seems it does not like brackets here at all! . Share this post Link to post Share on other sites
Joe98 92 Posted April 16, 2020 I got it! Find 10 places to hide the hostage You enter the map at 10 different places at random using markers. Each entry place should be only 2 meters apart so it feels like you are starting at the same place every time. You could even place 10 walls or shrubs to your front to enhance the feeling of starting at the same place every time. Each entry place has a trigger, therefore 10 triggers. Each trigger firstly places the hostage at a location and secondly deletes the other 9 triggers in case you walk into one by mistake. From the players point of view: The mission starts at the same place every time but the hostage is at one of 10 places at random every time . Share this post Link to post Share on other sites
Melody_Mike 130 Posted April 20, 2020 I haven't tested this myself, but-https://community.bistudio.com/wiki/getMarkerPos ^ Doesn't the syntax of getMarkerPos allow for Z coordinates, by setting PreserveElevation to false? Otherwise you can simply do getPos on an object (character, chair, hat) you place, that has everything in its special attributes unchecked (no simulation, invisible, no damage). Makes positioning a bit simpler in the editor. Share this post Link to post Share on other sites