604 B
604 B
Function: CastEntityCommand(caster, target, id, command)
Description: Calls an Entity Command through LUA versus the player triggering it themselves.
Parameters:
caster
(Spawn) - Spawn object representingcaster
.target
(Spawn) - Spawn object representingtarget
.id
(uint32) - Integer valueid
.command
(string) - Stringcommand
.
Returns: None.
Example:
-- From ItemScripts/AutomaticBook.lua
function obtained(Item, Spawn)
target = GetTarget(Spawn)
if target ~= nil then
-- CastEntityCommand(Spawn, target, 1, "Scribe")
end