GetSectorFloorZ and GetSectorCeilingZ: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
(Created page with "{{ACSFunction|description= Gets sector floor or ceiling height. |usage= ''fixed'' '''GetSectorFloorZ'''(''int tag'', ''int x'', ''int y'') ''fixed'' '''GetSectorCeilingZ'''('...")
 
m (Printz moved page GetSectorCeilingZ to GetSectorFloorZ and GetSectorCeilingZ: two functions are contained)
 
(No difference)

Latest revision as of 11:44, 25 April 2021

Description[edit]

This is an ACS built-in function.

Gets sector floor or ceiling height.

Usage[edit]

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

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

Parameters[edit]

  • 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[edit]

Examples[edit]

No examples given.

Notes[edit]

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[edit]