Changes

Jump to navigation Jump to search

Documentation/Engine/Advanced input configuration

1,336 bytes added, 11:43, 23 February 2023
Expressions
|
|Absolute value of the parameter.
|-
|abs_max(1..)
|1.43+
|Returns value of parameter with the biggest absolute value from all parameters. (e.g. abs_max(2, -5, -1, 4) returns -5). If there are multiple values with the same absolute value and a different sign, the value of the parameter with the lower index is returned.
|-
|sign(1)
|memory(2)
|1.35+
|Simple single-value memory. The memory starts at zero. If the first parameter evaluates to true, the second parameter is evaluated and its value is stored in the memory. Otherwise the second parameter is not evaluated and the memory is unchanged. The function returns the current value of the memoryafter the processing (i.e. the new value if the memory was updated).
|-
|modifier(2)
|1.35+
|Supports implementation of modifier-like keys. The first parameter represents "modifier" expression and the second parameter represents "button" expression. The function starts with returning 0.0. If it detects false to true transition on the "button" parameter while the "modifier" parameter is true, it will start returning 1.0 until the "button" parameter reverts to false after which it returns back to 0.0. Please note that the function detects changes only while it is being evaluated. If something, such as short-circuit logical operator, prevents the call, the function might miss some changes. Function evaluates the "modifier" parameter only during the leading edge (false => true) on the "button" parameter. Because of this, avoid using memory based elements within the "modifier" parameter to avoid risk of unexpected behavior.
|-
|short_press(1-2)
|1.41+
|Supports detection of short press. If the first input is temporarily >= 0.5 for interval shorter than a threshold, the function will return 1.0 until end of the frame it detected that in. The value of the threshold in milliseconds is configured by the second parameter and uses default value (200ms as of 1.46) if the second parameter is not provided. The detection only happens if the function is being evaluated (i.e. do not use it with short-circuit logical operators).
|-
|long_press(1-2)
|1.41+
|Supports detection of long press. If the first input is >= 0.5 for interval longer than a threshold, the function will return 1.0 until the input goes back to < 0.5. The value of the threshold in milliseconds is configured by the second parameter and uses default value (200ms as of 1.46) if the second parameter is not provided. The detection only happens if the function is being evaluated (i.e. do not use it with short-circuit logical operators).
|}

Navigation menu