30 lines
771 B
Plaintext
30 lines
771 B
Plaintext
//Put this script OnEnter
|
|
void main()
|
|
{
|
|
|
|
object oPC = GetEnteringObject();
|
|
|
|
if (!GetIsPC(oPC)) return;
|
|
|
|
object oTarget;
|
|
object oSpawn;
|
|
location lTarget;
|
|
oTarget = GetWaypointByTag("WP_stripper2_01");
|
|
|
|
lTarget = GetLocation(oTarget);
|
|
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "stripper2", lTarget);
|
|
|
|
oTarget = oSpawn;
|
|
|
|
//Visual effects can't be applied to waypoints, so if it is a WP
|
|
//the VFX will be applied to the WP's location instead
|
|
|
|
int nInt;
|
|
nInt = GetObjectType(oTarget);
|
|
|
|
if (nInt != OBJECT_TYPE_WAYPOINT) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_SUPER_HEROISM), oTarget));
|
|
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_SUPER_HEROISM), GetLocation(oTarget)));
|
|
|
|
}
|