Aller au contenu

Photo

Dynamic Lights on Dance Floor


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
Snarkblat

Snarkblat
  • Members
  • 52 messages
I remember a cool little module a white back called Bioware's Dance Club Example, which showed dynamic flashing lights on a dance floor.  Unfortunately, I can't find the module now, it appears to have been taken down from the Bioware site.

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;
}

}

#2
Bannor Bloodfist

Bannor Bloodfist
  • Members
  • 941 messages
Check your PM mail box.

#3
Snarkblat

Snarkblat
  • Members
  • 52 messages
Problem resolved :)