--- id: reflect-get name: Reflect.get category: reflect kind: namespace-method tokens: Reflect.get sig: Reflect.get(entity, prop, field) -> int tip: Read one field of an entity by (prop, field) id. order: 8 ns: Reflect member: get --- Reads the value of field field of property prop on entity, as an int. A fixed field comes back as its raw Q16.16 bits (the same integer fixed stores), so a generic reader can move it without interpreting it. Same as World.get, under the reflection namespace. Parameters: - `entity` — the entity to read - `prop` — a property id (from Reflect.prop) - `field` — a field id (from Reflect.field) ```ludic program Demo { property Health { hp: int = 0 } model Unit { Health } entry { spawn Unit { Health { hp: 7 } } let H = Reflect.prop("Health") print(Reflect.get(0, H, Reflect.field(H, "hp"))) # 7 } } ```