Author Topic: Dynamic Lights on Dance Floor  (Read 323 times)

Legacy_Snarkblat

  • Full Member
  • ***
  • Posts: 104
  • Karma: +0/-0
Dynamic Lights on Dance Floor
« on: July 04, 2011, 04:14:14 am »


               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. '<img'>
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;
}

}
               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Dynamic Lights on Dance Floor
« Reply #1 on: July 04, 2011, 04:21:24 am »


               Check your PM mail box.
               
               

               
            

Legacy_Snarkblat

  • Full Member
  • ***
  • Posts: 104
  • Karma: +0/-0
Dynamic Lights on Dance Floor
« Reply #2 on: July 04, 2011, 04:33:12 am »


               Problem resolved '<img'>