Skip to content

4.2.0 Release Plan #379

@x87

Description

@x87

Download

Features

float pos[3]
float rot[3]

foo(...pos)
...pos = get_char_coordinates $scplayer
set_char_coordinates $scplayer ...pos
...pos, ...rot = bar()


function foo(x: float, y: float, z: float)
end

function bar: float, float, float, float, float, float
end

function SetCamPos(pos: float[3], offset: float[3])
    Camera.SetFixedPosition(...pos, ...offset)
end

SetCamPos(100.0, 200.0, 44.1, 0.0, 1.0, 0.0)
  • support for variadic functions (functions where last argument accumulates a variable number of values as an array)
function loadModels(...models: int[16]) // allow up to 16 values
    int count = get_cleo_arg_count // get actual number of arguments, this is CLEO5 opcode
    count--
    int i

    for i = 0 to count
        request_model models[i]
    end
    load_all_models_now
end

// call with different number of arguments
loadModels()
loadModels(#ADMIRAL)
loadModels(#AMBULAN, #ALPHA)

Fixes

Breaking Changes

The compiler no longer scans the game directory to resolve the model id. Instead, it relies completely on the IDE configuration of the current mode #119. Existing modes have been updated to include the line (example for GTA SA):

<ide base="@game:\">@game:\data\gta.dat</ide>

This is the main file referencing other IDE files. It is called gta3.dat in GTA III, gta_vc.dat in GTA VC, and gta.dat in GTA SA. If you use a custom mode, update it accordingly to load that file.

Without this line you may experience compiler errors in CLEO scripts trying to compile a line with object model name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions