Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Variables accessible by Lua scripts, serialized as part of game state #7

@NoraCodes

Description

@NoraCodes

I think that the best way to handle keeping track of in-game state, things like "player has completed this quest", is to have, in game state and saved off with the rest of the game state's information, a way to store values by name. The syntax/semantics might be something like this:

To set an info by name:

set_info("completed castle quest", true)

Then, for example in an on_interact:

if get_info("completed castle quest") then
    say "Good job completing that quest!"
else
    say "You'd better get busy with that castle quest!"
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions