1
0
EQ2Emu/docs/lua_functions/SetTarget.md
2025-05-28 21:48:33 -04:00

599 B
Raw Blame History

Function: SetTarget(Originator, Target)

Description: Forces one spawn (Originator) to target another (Target). This can make an NPC switch targets mid-combat or cause a players target to change under certain conditions.

Parameters:

Originator: Spawn The entity whose target will be changed. Target: Spawn The entity to set as the new target.

Returns: None.

Example:

-- Example usage (boss switches target to a healer)
SetTarget(BossNPC, HealerNPC)
SetInfoFlag(BossNPC) -- assures we send the changes out immediately versus waiting for process loop