Working with scripts, testing new chair
This commit is contained in:
1 parent
4044acefb2
commit
49501e32ce
9 files changed
+63646
-88
No files matched your search
@@ -188,6 +188,9 @@ namespace ZL
|
||||
|
||||
ItemRegistry::instance().loadFromJson("resources/config2/items.json", CONST_ZIP_FILE);
|
||||
|
||||
|
||||
globalInts["player_hp"] = 200;
|
||||
|
||||
LocationSetup uniInteriorParams;
|
||||
uniInteriorParams.gameObjectsJsonPath = "resources/config2/gameobjects_uni_interior.json";
|
||||
uniInteriorParams.npcsJsonPath = "resources/config2/npcs_uni_interior.json";
|
||||
|
||||
@@ -198,6 +198,11 @@ namespace ZL {
|
||||
if (game->player)
|
||||
game->player->hp = value;
|
||||
});
|
||||
// get_player_hp() → float (0 if no player)
|
||||
api.set_function("get_player_hp",
|
||||
[game]() -> float {
|
||||
return game->player ? game->player->hp : 0.0f;
|
||||
});
|
||||
|
||||
// Global integer store — shared across all location scripts.
|
||||
// setIntValue(key, value) / getIntValue(key) → int (0 if not set)
|
||||
|
||||
Reference in new issue
Block a user