No categories assigned

LUA:SpawnMove

Revision as of 03:56, 12 November 2013 by Thefoof (talk | contribs) (LUA Functions: SpawnMove())
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

LUA Functions: SpawnMove()

This lets a player move a spawn like the /spawn move command.


Syntax

SpawnMove(param1, param2, [param3], [param4])


Parameters

Required - param1 (Spawn*), param2 (Player*)
param1 is the spawn to be moved
param2 is the player who is moving the spawn
Optional - param3 (float), param4 ("string")
param3 is the max_distance away from the player the moved spawn can be set
param4 can be either "wall" or "ceiling" for alternate placement types


Usage

function hailed(NPC, Spawn)
    SpawnMove(NPC, Spawn, 10)
end

When this spawn is hailed, the spawn will be moved by the player that hailed it.