— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
— — — — —
This is an old revision of the document!
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.
set_gameplay_property(property_name, property_value)
Argument | Description | Type | Required |
---|---|---|---|
property_name | Name of the property to change (see table below for supported properties). | String | Yes |
property_value | New value for the property. | String, Number, Boolean | Yes |
The following properties are available to change using this function:
Property | Description | Type |
---|---|---|
movement_control_type | Determines 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_control | Decimal value from 0 to 1 (i.e. 0 percent to 100 percent air control). | Number |
jump_enabled | Determines whether jumping is enabled. Free movement only. | Boolean |
jump_vertical_velocity | Number | |
jump_count | Determines how many times the player can jump in succession (e.g. a value of 2 would be used to allow double jumping). Free movement only. | Number |
free_attack_system | Possible 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_fov | Camera's FOV (field of view) in degrees. Value can be from 1 to 179. | Number |
fall_damage_enabled | Boolean | |
fall_damage_min_velocity | Number | |
fall_damage_base_damage | Number | |
fall_damage_excess_damage | Number | |
fall_damage_max_velocity | Number | |
fall_damage_max_critical | If enabled, the player will be automatically killed when hitting the ground at or above the maximum velocity. | Boolean |
Results:
Use the Set Gameplay Property function to…