Lilac Soul user Clyordes here again.
I've got a script that works - sometimes. What's supposed to happen, is when a character (anyone in the party) enters a trigger, it checks for the value of a variable "sussurus_alive".
If its anything other than '2', nothing happens.
If its '2', a bit of floaty text about coffin lids moving appears, and a group of undead spawn at various waypoints.
The script should only fire the undead spawn once - the coffins only have enough room for one skeleton each!
The variable depends on whether a creature called the sussurus is alive or not, and changes to '2' via its ondeath script. This seems to be working OK, as the same script generates a bit of floaty text, which shows fine - so I'm assuming the variable is changing too.
For some reason though, the on_enter trigger script works sometimes, but not others.
What seems to be important in making the trigger fire is that the person who killed the sussurus is the one you're controlling when entering the trigger - which may make complete sense to someone who understands scripting better than me, but I can't see what I need to change to make it work regardless of who kills the suss & who you're controlling when you enter the trigger.
This is the script I have - please take a look & see if you can let me know what will work whoever enters the trigger:
//Put this script OnEnter
#include "nw_i0_generic"
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
if (GetLocalInt(oPC, "sussurus_alive")== 2)
{
FloatingTextStringOnCreature("You hear the worrying noise of sarcophagus lids being opened...", oPC);
oTarget = GetWaypointByTag("i1");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lichway_skele_dagger", lTarget);
oTarget = oSpawn;
SetIsTemporaryEnemy(oPC, oTarget);
AssignCommand(oTarget, ActionAttack(oPC));
AssignCommand(oTarget, DetermineCombatRound(oPC));
oTarget = GetWaypointByTag("i2");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lichway_skele_dagger", lTarget);
oTarget = oSpawn;
SetIsTemporaryEnemy(oPC, oTarget);
AssignCommand(oTarget, ActionAttack(oPC));
AssignCommand(oTarget, DetermineCombatRound(oPC));
oTarget = GetWaypointByTag("i3");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lichway_skele_club", lTarget);
oTarget = oSpawn;
SetIsTemporaryEnemy(oPC, oTarget);
AssignCommand(oTarget, ActionAttack(oPC));
AssignCommand(oTarget, DetermineCombatRound(oPC));
oTarget = GetWaypointByTag("i4");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lichway_skele_club", lTarget);
oTarget = oSpawn;
SetIsTemporaryEnemy(oPC, oTarget);
AssignCommand(oTarget, ActionAttack(oPC));
AssignCommand(oTarget, DetermineCombatRound(oPC));
oTarget = GetWaypointByTag("i5");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lichway_skele_dagger", lTarget);
oTarget = oSpawn;
SetIsTemporaryEnemy(oPC, oTarget);
AssignCommand(oTarget, ActionAttack(oPC));
AssignCommand(oTarget, DetermineCombatRound(oPC));
oTarget = GetWaypointByTag("i6");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lichway_skele_dagger", lTarget);
oTarget = oSpawn;
SetIsTemporaryEnemy(oPC, oTarget);
AssignCommand(oTarget, ActionAttack(oPC));
AssignCommand(oTarget, DetermineCombatRound(oPC));
oTarget = GetWaypointByTag("i7");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lichway_skele_dagger", lTarget);
oTarget = oSpawn;
SetIsTemporaryEnemy(oPC, oTarget);
AssignCommand(oTarget, ActionAttack(oPC));
AssignCommand(oTarget, DetermineCombatRound(oPC));
oTarget = GetWaypointByTag("i8");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lichway_skele_club", lTarget);
oTarget = oSpawn;
SetIsTemporaryEnemy(oPC, oTarget);
AssignCommand(oTarget, ActionAttack(oPC));
AssignCommand(oTarget, DetermineCombatRound(oPC));
oTarget = GetObjectByTag("trigger_south_south");
DestroyObject(oTarget, 0.0);
}
else
{
}
}
Thanks folks, Cly.





Retour en haut






