Scripting/Server/NPCs/npc.SetObjective

Starts a behaviour. See the table below.

Syntax

npc.SetObjective(objective [, argument])

Arguments

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.

Section: NPC members

Categories: Server functions | NPC members