Using the commands I found in mobutils.cpp and lua_baseentity.cpp I tried to setup a simple yellow trigger script like so:
Code: Select all
cmdprops =
{
permission = 1,
parameters = "s"
};
function onTrigger(player, WeaknessType)
local targ = player:getTargetID();
if (targ ~= nil) then
targ:WeaknessTrigger( yellow );
else
player:PrintToPlayer("You must select a valid target first.");
end
end;