Skip to content

GravityEffect ​

Inherits: Effect < DatabaseResource < Resource

Modifies the gravity applied to the target entity Can be used for low gravity, high gravity, anti-gravity, or zero gravity effects

Properties ​

floatgravity_value9.8
booluse_presetfalse
GravityPresetgravity_preset2

Methods ​

voidspecific_effect_logic( effect_instance: EffectInstance )
voidon_apply_finished( effect_instance: EffectInstance )
Stringget_effect_description()
Stringget_editor_description()
Array[Dictionary]validate()

Enumerations ​

enum GravityPreset ​

The options of gravity preset: zero gravity, low gravity, normal gravity, high gravity, anti gravity.

  • ZeroGravity = 0
  • LowGravity = 1
  • NormalGravity = 2
  • HighGravity = 3
  • AntiGravity = 4

Property descriptions ​

float gravity_value = 9.8 ​

The gravity value to apply (default: 9.8, 0 = floating, negative = anti-gravity)

Presets

bool use_preset = false ​

Use a preset instead of custom value

GravityPreset gravity_preset = 2 ​

The kind of gravity the target gets (low, high, none ...).

Method descriptions ​

void specific_effect_logic( effect_instance: EffectInstance ) ​

Apply gravity modification to the target

void on_apply_finished( effect_instance: EffectInstance ) ​

When effect is removed, restore original gravity

String get_effect_description() ​

The text of the effect for tooltips, with its values filled in.

String get_editor_description() ​

A short text for the effect editor that says what the effect does.

Array[Dictionary] validate() ​

Validation