Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_action_if_variable

(view raw script w/o annotations or w/e)
1
function action_if_variable(argument0, argument1, argument2) //gml_Script_action_if_variable
2
{
3
    var ret = false
4
    switch argument2
5
    {
6
        case 1:
7
            ret = argument0 < argument1
8
            break
9
        case 2:
10
            ret = argument0 > argument1
11
            break
12
        case 3:
13
            ret = argument0 <= argument1
14
            break
15
        case 4:
16
            ret = argument0 >= argument1
17
            break
18
        default:
19
            ret = argument0 == argument1
20
            break
21
    }
22
23
    return ret;
24
}