Page MenuHomeFeedback Tracker

findEmptyPosition does not necessarily return an empty position
New, WishlistPublic

Description

Using findEmptyPosition on some locations will simply return a position that isn't valid for spawning/positioning the specified unit type.

Example: Rocks on cliff east of the road going south out of Agia Marina.

Basically, the the valid check for the positions returned needs to be more strict in order to make findEmptyPosition safe to use.

Details

Legacy ID
3357656756
Severity
None
Resolution
Open
Reproducibility
Always
Category
Scripting
Steps To Reproduce

Put this code in a soldier's init line:

player setPos ([2793.41,5884.82,0] findEmptyPosition [0, 1, typeOf this]); onMapSingleClick "player setPos (_pos findEmptyPosition [0, 1, typeOf player]); hint str _pos; diag_log _pos;";

Event Timeline

galzohar edited Steps To Reproduce. (Show Details)May 2 2013, 12:14 AM
galzohar edited Additional Information. (Show Details)
galzohar set Category to Scripting.
galzohar set Reproducibility to Always.
galzohar set Severity to None.
galzohar set Resolution to Open.
galzohar set Legacy ID to 3357656756.May 7 2016, 1:56 PM
Bohemia added a subscriber: AD2001.May 2 2013, 12:14 AM

I am having similar issues with just the map editor.

See: http://feedback.arma3.com/view.php?id=2563

Ironically, somebody suggested using findEmptyPosition to counter this. :s

Imma idiot. We are having a full circle..

Yes, both issues are probably caused by the same bug.

Just noticed http://feedback.arma3.com/view.php?id=4029 was closed due to lack of activity, though the issues are related.

Unless I missed something, this wasn't fixed yet, and it's quite critical for some scripts/missions.

I ran into this too, rocks seem to be the main problem for me. As long as they're big enough for the unit to fit inside without touching the actual mesh then the command thinks it's empty.

Not just rocks, buildings too. For example ghost hotel will repeatedly create this issue.

This is still an issue (often game-breaking and requires many nasty workarounds).

It would be very helpful if this command worked reliably.