The "effect" Function

Syntax

effect();
ArgumentTypeDescription
N/AN/ANo arguments

Description

Initializes a segment of code containing VNgen effect instructions only (not regular keyframe data). Cannot be used in the regular Q-script loop, but rather is intended for use in dedicated effect scripts. See Creating Custom Effects for full details.

Example

if effect() {
draw_set_alpha(ef_var[0]);
draw_rectangle(input_x, input_y, input_x + input_width, input_y + input_height, false);
draw_set_alpha(1);
}