No categories assigned

LUA:AddSpawnAccess


LUA:AllFunctions - AddSpawnAccess

Return to: LUA:AllFunctions | Tutorials | Portal | Forum | Project Manager | Bug Tracker


Adds access to a private spawn for the given spawn.

Syntax

AddSpawnAccess(param1, param2)

Parameters

Required - param1 (Spawn), param2 (Spawn)
param1 is the private spawn
param2 is the spawn gaining access to the private spawn


Example

function hailed(NPC, Spawn)
    -- Get a pointer to the closest spawn in the zone with a DB id of 120001
    private_spawn = GetSpawn(Spawn, 120001)
    -- Add access to the player to be able to see the private spawn
    AddSpawnAccess(private_spawn, Spawn)
end

This will allow the player to see the private spawn.

Notes

Use this to hide an NPC from player after a specific step in a quest has been completed