From ZDoom Wiki
Jump to navigation Jump to search
Note: This feature is for ZScript only.

bool CheckMove(Vector2 newpos [, int flags [, FCheckPosition tm]])


Checks to see if the caller can successfully move to newpos in the map. Unlike TryMove this function will not actually move the caller if the check passes.


  • newpos: The xy location to check. Note that this is absolute and not relative to the caller.
  • flags: Default is 0.
  • PCM_DROPOFF — Don't allow moves where the drop off exceeds the caller's MaxDropOffHeight. Actors with FLOAT or DROPOFF will ignore this.
  • PCM_NOACTORS — Ignore any Actors that may be blocking the move
  • PCM_NOLINES — Ignore any lines that may be blocking the move
  • tm: Default is null. Stores information about the check at newpos such as the sector, the floor and ceiling z coordinates, etc.

Return value

Returns true if the caller could successfully move to newpos.


Nuvolachalk.png Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated.