1
0
EQ2Emu/docs/lua_functions/GetInfoStructSInt.md
2025-05-13 22:57:49 -04:00

16 lines
491 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Function: GetInfoStructSInt(Spawn, FieldName)
Description: Gets a signed integer field from the spawns info struct. Similar to GetInfoStructUInt but for fields that can be negative.
Parameters:
Spawn: Spawn The entity to query.
FieldName: String The field name to retrieve.
Returns: Int32 The value of that field.
Example:
-- Example usage (get an NPC's faction alignment which could be negative or positive)
local faction = GetInfoStructSInt(NPC, "faction_id")