User Tools

Site Tools


set_gameplay_property

This is an old revision of the document!


Set Gameplay Property


Sets a gameplay property to the specified value. This function allows you to modify certain mechanics at game time, specifically those found in the “Gameplay” section of the Game Configuration dialog. Refer to the table at the bottom for a list of supported property names and an explanation of their usage.

Signature:

set_gameplay_property(property_name, property_value)
ArgumentDescriptionTypeRequired
property_nameName of the property to change (see table below for supported properties).StringYes
property_valueNew value for the property.String, Number, BooleanYes

The following properties are available to change using this function:

PropertyDescriptionType
movement_control_typeDetermines whether the player's movement is relative to the camera or uses the tank control method. Value must be “relative” or “tank”.String
gravity Number
air_controlDecimal value from 0 to 1 (i.e. 0 percent to 100 percent air control).Number
jump_enabledDetermines if jumping is enabled. Free movement only.Boolean
jump_vertical_velocityDetermines the player's initial upward velocity in voxels per second when jumping. Jumping must be enabled for this value to have an effect.Number
jump_countDetermines how many times the player can jump in succession (e.g. a value of 2 would allow double jumping). Jumping must be enabled for this value to have an effect.Number
free_attack_systemPossible values are “default” (player character will attack in the direction they're facing) and “cursor” (player character will attack in the direction of the mouse cursor).String
camera_fovCamera's FOV (field of view) in degrees. Value can be from 1 to 179.Number
fall_damage_enabledDetermines if fall damage is enabled. Free movement only.Boolean
fall_damage_min_velocityFall damage must be enabled for this value to have an effect.Number
fall_damage_base_damage Fall damage must be enabled for this value to have an effect.Number
fall_damage_excess_damageFall damage must be enabled for this value to have an effect.Number
fall_damage_max_velocityFall damage must be enabled for this value to have an effect.Number
fall_damage_max_criticalIf enabled, the player will be automatically killed when hitting the ground at or above the maximum velocity. Fall damage must be enabled for this value to have an effect.Boolean

Example:

 

Results:

Use the Set Gameplay Property function to…


Editor Node:

set_gameplay_property.1725331434.txt.gz · Last modified: 2024/09/02 19:43 by justin