Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Building pos max index?

  1. #1

    Building pos max index?

    I want to place a target in a random building in a random spot at the building, however different buildings have a different number of allowed conditions. After I pick a building, is there any way to check how many indexes are legal without making some stupid workarounds?

    I'd hate to do it by checking each and every building, and I'd hate to do it by checking when it returns an invalid position, but I suppose if there's no better solution I'll have to do just that.

  2. #2
    There was a buildingPos.sqf thingie for ArmA.. I'll try to find the link.

    Found it: http://www.armaholic.com/page.php?id=879

  3. #3
    He does it in the ugly way which is what I was trying to avoid but I suppose there's no real choice.

  4. #4
    I did it like this. Not perfect, but couldn't think of any other way since iirc the info isn't in the config.

  5. #5
    What's really annoying is that unless I'm doing something wrong, some buildings don't have any positions at all, and some have 0 as a non-viable position yet 1 is viable, while others have 0 as a viable position as well.

  6. #6
    yup, not all buildings have positions and some that do the position is simply standing outside.

  7. #7
    Some buildings don't have positions... Some buildings aren't even identified by the nearestBuilding or object commands.

    You could always use my house patrol script and modify it if you want..
    http://www.armaholic.com/page.php?id=6078

  8. #8
    Is it just be or do some buildings have 0 as a non-viable index while other indexes (for the same building) are viable?

  9. #9
    When a specific index position in a building doesn't exist buildingPos will return a 0 pos array, means [0,0,0].

    Code:
    if (format ["%1",mybuilding buildingPos 20] == "[0,0,0]") then {
        // not a valid position
    };
    For example, the hotel in A1 had about 250 building positions but many of them weren't usable because they were in locked rooms.

    Xeno

  10. #10
    I noticed there is a function for creating doors called BIS_ALICE_fnc_doorCreate. It places invisible doors on houses - probably other things too. You might be able to make empty houses useable. I've no idea how to use it though.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •