Skip to content

ScriptingSector

SuperTux Bot edited this page Jan 11, 2025 · 13 revisions

This file is auto-generated from the SuperTux source code, using the template ScriptingPage.md.

Summary

This class provides additional controlling functions for a sector, other than the ones listed at GameObjectManager.

Instances

An instance under sector.settings is available from scripts and the console.

Inheritance

This class inherits functions and variables from the following base classes:

Methods

Method Explanation
bool is_free_of_solid_tiles(float left, float top, float right, float bottom, bool ignore_unisolid) Checks if the specified sector-relative rectangle is free of solid tiles.

ignore_unisolid - If true, unisolid tiles will be ignored.
bool is_free_of_statics(float left, float top, float right, float bottom, bool ignore_unisolid) Checks if the specified sector-relative rectangle is free of both: 1) Solid tiles. 2) MovingObjects in COLGROUP_STATIC.

NOTE: This does not include badguys or players.

ignore_unisolid - If true, unisolid tiles will be ignored.
bool is_free_of_movingstatics(float left, float top, float right, float bottom) Checks if the specified sector-relative rectangle is free of both: 1) Solid tiles. 2) MovingObjects in COLGROUP_STATIC, COLGROUP_MOVINGSTATIC or COLGROUP_MOVING. This includes badguys and players.
bool is_free_of_specifically_movingstatics(float left, float top, float right, float bottom) Checks if the specified sector-relative rectangle is free of MovingObjects in COLGROUP_MOVINGSTATIC.

NOTE: This does not include moving badguys or players.
void set_gravity(float gravity)
float get_gravity(float gravity)

Variables

Variable Explanation
float gravity The sector's gravity.

Constants

None.

Clone this wiki locally