eq2emu/docs/lua_functions/SetAlignment.md

20 lines
541 B
Markdown
Raw Permalink Normal View History

2025-05-25 21:42:32 -04:00
### Function: SetAlignment(spawn, alignment)
2025-05-04 14:34:15 -04:00
**Description:**
2025-05-25 21:42:32 -04:00
Sets the alignment of the Spawn to the value.
2025-05-04 14:34:15 -04:00
**Parameters:**
2025-05-25 21:42:32 -04:00
- `spawn` (Spawn) - Spawn object representing `spawn`.
- `alignment` (int32) - Integer value `alignment`.
2025-05-04 14:34:15 -04:00
**Returns:** None.
**Example:**
```lua
2025-05-25 21:42:32 -04:00
-- From ItemScripts/ForgeryFreeportCitizenshipPapers.lua
if GetRace(Player) == 0 or GetRace(Player) == 3 or GetRace(Player) == 5 or GetRace(Player) == 6 or GetRace(Player) == 9 or GetRace(Player) == 11 or GetRace(Player) == 20 then
SetAlignment(Player, 2)
end
2025-05-04 14:34:15 -04:00
```