GetSectorFloorZ and GetSectorCeilingZ

From Eternity Wiki
Revision as of 11:43, 25 April 2021 by Printz (talk | contribs) (Created page with "{{ACSFunction|description= Gets sector floor or ceiling height. |usage= ''fixed'' '''GetSectorFloorZ'''(''int tag'', ''int x'', ''int y'') ''fixed'' '''GetSectorCeilingZ'''('...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Description

This is an ACS built-in function.

Gets sector floor or ceiling height.

Usage

fixed GetSectorFloorZ(int tag, int x, int y)

fixed GetSectorCeilingZ(int tag, int x, int y)

Parameters

  • tag: tag of sector to check. If it's zero, it will check the floor or ceiling of whatever sector is at coordinates x and y.
  • x, y: integer (not fixed point!) coordinates where to check the height. They are relevant either if tagged sector is sloped, or if tag is 0, in which case it picks up the sector from this location.

Return value

Examples

No examples given.

Notes

Beware that while x and y are expressed as integer (so you'll use the same values as shown in the editor, without .0), the return value is in fixed point.

IMPORTANT: If multiple sectors share the same tag, it will check the location of x and y if the pointed sector has the tag. If so, it will return the surface altitude of that sector. If the pointed sector doesn't have the tag, it will return the altitude of the first sector from the map with the tag, which if sloped, will be extrapolated for that location.

This function's identification in zspecial.acs is: (ACC internal).

See also