AddNPC

Description

Adds a new character or moves the existing character to the specified locator upon reaching a specific stage in a mission.

AddNPC(Character_Name, Locator_Name);

Parameters

Character_Name

The name of the character you're loading, i.e "homer".

Characters do not need to be explicitly loaded prior to the mission script being executed.

Locator_Name

The name of the Locator where you'd like the NPC to spawn, i.e "level1_homer_walkto".

This locator can be loaded at any point prior to the mission script being executed.

Examples

Here's an example of this command being used to add marge to a stage on a Locator named m1_marge_sd. Note that this command must be called inside the stage's objective.

AddStage();
	AddObjective("dummy");
		AddNPC("marge", "m1_marge_sd");
	CloseObjective();
CloseStage(); 
Back to top