Difference between revisions of "LUA:SetFactionID"
(Created page with "{{LUAFunction |Name = SetFactionID |Description = Sets the faction of a spawn to a faction id |Param1 = Spawn |Param1Desc = is the spawn to change the faction of |Param2 = int...") |
(No difference)
|
Latest revision as of 17:43, 15 June 2022
LUA:AllFunctions - SetFactionID
Return to: LUA:AllFunctions | Tutorials | Portal | Forum | Project Manager | Bug Tracker
Sets the faction of a spawn to a faction id
Syntax
SetFactionID(param1, param2)
Parameters
- Required - param1 (Spawn), param2 (int32)
- param1 is the spawn to change the faction of
- param2 is the id of the faction we want to use
Example
function hailed(NPC, Player) SetFactionID(NPC, 1) end
An NPC with this script will set it's faction to 1 when hailed.