EDIT: See next post.
Sorry about that, I will try to be a bit more detailed here.
Here are the scripts:
a_dance_death1
//Put this script OnDeath
void main()
{
object oPlaceable = GetNearestObjectByTag("c_dance1", GetObjectByTag("dance_point1"), 1);
DestroyObject(oPlaceable, 0.0, FALSE);
int nDancers = GetGlobalInt("dancers2");
SetGlobalInt("dancers2", nDancers-=1);
}
a_dance_rest_hb1
//Goes on creature's OnHeartbeat.
void main()
{
object oPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC);
if (GetLocalInt(GetObjectByTag("dance_point1"), "respit1") != 1) return;
DestroyObject(OBJECT_SELF);
}
a_dance_set1
void main()
{
SetGlobalInt("dancers2", 5);
}
a_dance_set_off1
//Put this script OnEnter
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
if (GetLocalInt(GetObjectByTag("gold_crown"), "equipped") == 1) return;
if(GetGlobalInt("dancers2") == 0) return;
SetLocalInt(GetObjectByTag("dance_point1"), "respit1", 1);
SetLocalInt(GetObjectByTag("dance_point1"), "once1", FALSE);
}
a_dance_set_on1
//Put this script OnEnter
#include "nw_i0_generic"
void main()
{
object oPC = GetEnteringObject();
object oPlaceable = GetNearestObjectByTag("c_dance1", oPC, 1);
if(GetLocalInt(GetObjectByTag("dance_point1"), "once") == TRUE) return;
if(GetLocalInt(GetObjectByTag("gold_crown"), "equipped") == 1) return;
if(!GetIsPC(oPC)) return;
if(GetGlobalInt("dancers2") == 0) return;
if(oPlaceable == OBJECT_INVALID) return;
SetLocalInt(GetObjectByTag("dance_point1"), "respit1", 0);
int nShields;
for (nShields = 0; nShields < GetGlobalInt("dancers2"); nShields++)
{
object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "dancing_sword", GetLocation(GetWaypointByTag("wp_dance1")));
SetIsTemporaryEnemy(oPC, oSpawn);
AssignCommand(oSpawn, ActionAttack(oPC));
AssignCommand(oSpawn, DetermineCombatRound(oPC));
}
SetLocalInt(GetObjectByTag("dance_point1"), "once1", TRUE);
}
Generic Trigger: TAG - swords_off1 - On Enter: a_dance_set_off1
Generic Trigger: TAG - swords_off2 - On Enter: a_dance_set_off1
Generic Trigger: TAG - swords_on1 - On Enter: a_dance_set_on1
Generic Trigger: TAG - swords_on2 - On Enter: a_dance_set_on1
Waypoint: TAG - swp_dance1
Ipoint: TAG - sdance_point1 (Strange looking red flag with a waving design)
5x Plaque {Swords - TINT}: TAG - c_dance1
Functionality: The blue devil-face when interacted with dumps the unfortunate target into a room with a fountain and one exit. If the player attempts to leave by that exit, (thus entering area swords_on1), limitless numbers of swords and shields are spawned at swp_dance1 until they player dies or walks backwards over area swords_off1, which causes them all to de-spawn. Any players on the outside attempting to enter from the front will have the same effect - unlimited numbers of vorpal swords are spawned from area swords_on2 until the player backs out over area swords_off2, which again de-spawns them. I don't know what the Ipoint does, I think it's a sound effect of some form, but I am not certain.
The scripts work properly if I remove the area the_final_level, However, it puzzles me, since I have used the Area Contents tab and visual inspection to make certain that waypoint swp_dance1 does not exist elsewhere, and just to make sure that was not the issue, I made copies of all of the scripts and everything they interacted with in the module, and then changed their code so they were native to the area, interacting with new tags.