I cannot figure out for the life of me why this isn't working.
Situation: I have a room where when you step onto this platform, a bunch of pretty pink electric-like walls surround the entire square. There is a boss, two bodyguards, and seven corpses on the floor. I want this to happen: Player steps into square, player kills the three NPC's, and the seven corpses rise as zombies. When all the seven zombies are dead, the walls will disappear.
Now, I'm attempting to do this with GetModule() to set the global int. For debugging purposes, I set for the three NPC's to say the value of the global int over their heads, and they do indeed count to 3.
The problem: These corpses
will not respond to the variable on heartbeat, and I'm probably doing it wrong.
void main()
{
if (GetLocalInt(GetModule(), "bonecaller1") > 2){
effect eMind = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
string sCreature = "zombie1";
object oMonster = CreateObject(OBJECT_TYPE_CREATURE, sCreature, GetLocation(OBJECT_SELF));
ApplyEffectToObject(DURATION_TYPE_INSTANT, eMind, oMonster);
SetPlotFlag(OBJECT_SELF, FALSE);
DestroyObject(OBJECT_SELF, 0.5);
}
}
And... Second question. I'm having trouble finding anything of use via Google/Lexicon for having something happen to multiple objects of the same tag. I have about 30 waypoints with the same tag around the square, and I'd like the generic trigger to spawn walls to all of them at once without having to go into each and every WP to change the tag. Is this possible?
Modifié par The Great Thief, 17 mai 2012 - 06:19 .