Skip to content

rc_runtime_activate_achievement

Jamiras edited this page Sep 7, 2020 · 1 revision

Loads an achievement trigger into the runtime.

Syntax

int rc_runtime_activate_achievement(
    rc_runtime_t* runtime,
    unsigned id,
    const char* memaddr,
    lua_State* L,
    int funcs_idx
);

Parameters

runtime

Pointer to the runtime object that will contain the achievement trigger reference.

id

A unique identifier for the achievement trigger.

memaddr

A null-terminated string that defines the trigger for the achievement.

L (NOT USED)

A pointer to a lua_State that contains the LUA functions needed by the trigger. May be NULL if the trigger does not use LUA functions.

funcs_index (NOT USED)

The index to the functions table in the lua_State.

Return value

If the function succeeds, the return value is RC_OK. Otherwise, the error code can be converted to a string using rc_error_str.

Remarks

Only one trigger may exist for a given unique identifier. Calling this function with an existing identifier will overwrite the previous trigger.

An activated achievement starts in the "waiting" state. It must evaluate false before it will transition to the "active" state, and must be "active" before it can trigger.

Minimum version: 9.0.0

See also

rc_runtime_init

rc_runtime_deactivate_achievement

rc_runtime_get_achievement

rc_runtime_do_frame

rc_runtime_reset

rc_runtime_serialize_progress

rc_runtime_deserialize_progress

rcheevos

rc_client

Integration guide

client

user

game

processing

rc_client_raintegration

Integration guide

rc_runtime

rhash

rapi

common

user

runtime

info

Clone this wiki locally