generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit.
This commit is contained in:
40
_module/nss/l404_trig_goaway.nss
Normal file
40
_module/nss/l404_trig_goaway.nss
Normal file
@@ -0,0 +1,40 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Trigger Enter Event
|
||||
//:: FileName l404_trig_goaway
|
||||
//:: Copyright (c) 2003 Red Golem
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Makes creatures move away from the waypoint if they enter
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Red Golem
|
||||
//:: Created On: 7/11/2003
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
object oMod = GetModule();
|
||||
|
||||
object oEntering = GetEnteringObject();
|
||||
|
||||
if (GetIsPC(oEntering) || GetIsDM(oEntering) || GetIsPossessedFamiliar(oEntering))
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
string wayPointName = GetName(OBJECT_SELF);
|
||||
object wayPoint = GetNearestObjectByTag(wayPointName, oEntering);
|
||||
|
||||
AssignCommand(oEntering, ClearAllActions());
|
||||
if (GetIsObjectValid(wayPoint))
|
||||
{
|
||||
AssignCommand(oEntering, ActionMoveAwayFromLocation(GetLocation(wayPoint), FALSE, 30.0f));
|
||||
}
|
||||
else
|
||||
{
|
||||
object this = OBJECT_SELF;
|
||||
AssignCommand(oEntering, ActionMoveAwayFromLocation(GetLocation(this), FALSE, 30.0f));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user