The script below rolls a d4 and if the roll is met creates a set of glowing eyes mto the location of a waypoint taged eyes.Adjust your waypoint to gravestones or other spooky objects that you would want to set a pair of glowing eyes on.Place this script in the on enter of a trigger you have drawn and once the pc enters it it will fire the script.
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
int nRandom = d4(1);
if (nRandom == 3)//Random is set on d4 rolling a 3....
{
object oTarget = GetObjectByTag("eyes");
location lLocation = GetLocation(oTarget);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_EYES_RED_FLAME_TROGLODYTE), lLocation);
}
else
{
}
}
Modifié par Builder_Anthony, 15 octobre 2011 - 01:37 .