Various Target functions
ResetTarget
Resets target object.
Syntax
ResetTarget 1
-- Resets target object
Example
// This will set the Player, and an object from memory as enemy
xpt_IHateEveryone
{
actions
{
TargetFromMem 6
Relationship target, enemy, 1
ResetTarget 1
TargetPlayer 1
Relationship target, enemy, 2
ResetTarget 1
}
}
IgnoreTarget
Ignores a target object for a specified time.
Syntax
IgnoreTarget [integer]
-- NPC will not know this object exists for 5 seconds
IgnoreTarget [integer]:[integer]
-- NPC will not know this object exists for a randomized time
Example
pt_end
{
actions
{
IgnoreTarget 20
ResetTarget 1
State st_start
}
}
SetTarget
Sets target objects for an object
Syntax
SetTarget "[object].Object:target Object:[object]"
-- Sets the object's target object from the caller's object
SetTarget "Object:self target.Object:slot#[memory slot]"
-- Sets our target from a target's memory slot
Example
// This will set our target's target object ourself
SetTarget "target.Object:target Object:self"
// This will set our target's target object our caller
SetTarget "target.Object:target Object:caller"
// This will set the caller's target object ourself
SetTarget "caller.Object:target Object:self"
// This will set our target object from our current target's memory slot
SetTarget "Object:self target.Object:slot#6"