Here's what I do remember: the script went on the heartbeat of a placeable
object that applies a different color each round. The author didn't mess with the Set TileMainLightColor() function as he found it caused too much lag. Instead, he added the light VFX to an invisible object.
I've tried to do something similar as you can see below, but when I test my module, I see nothing. No lights.
Does anyone have a suggestion?
//Goes on creature's OnHeartbeat. Fires when not fighting or talking.
void main()
{
object oPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, OBJECT_SELF, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN);
if (IsInConversation(OBJECT_SELF) || GetIsInCombat()) return;
switch(Random(4))
{
case 0: ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_LIGHT_RED_15), OBJECT_SELF);
break;
case 1: ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_LIGHT_ORANGE_15), OBJECT_SELF);
break;
case 2: ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_LIGHT_PURPLE_15), OBJECT_SELF);
break;
case 3: ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_LIGHT_BLUE_15), OBJECT_SELF);
break;
}
}





Retour en haut






