Scripting/Server/NPCs/npc.SetObjective
Starts a behaviour. See the table below.
Syntax
npc.SetObjective(objective [, argument])Arguments
- any objective
- any argument (optional)
Example
function onPlayerCommand( player, cmd, params )
{
if ( cmd == "setobjective" )
{
// npc is a npc handle (see NPC members)
npc.SetObjective( 0 );
}
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
Section: NPC members
Categories: Server functions | NPC members