So, what am I missing?
I have the spiders set to inactive and neutral.
I have the TRIGGER_DO_ONCE_A variable set at a numerical value of 1 on the trigger.
Should any other variables be set?
Do I need to set a variable on my creature (spiders)?
Should the script be attached to the area or the trigger?
//::///////////////////////////////////////////////
//:: Trigger Events Template
//:: Copyright © 2003 Bioware Corp.
//:://////////////////////////////////////////////
/*
Trigger events : Activate the spider fight
*/
//:://////////////////////////////////////////////
//:: Created By: Keith Warner
//:: Created On: 11/06/08
//:://////////////////////////////////////////////
#include "log_h"
#include "utility_h"
#include "wrappers_h"
#include "events_h"
#include "ntb_constants_h"
const int TEAM_MY_CREATURE = 7;
void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
string sDebug;
object oPC = GetHero();
object oParty = GetParty(oPC);
int nEventHandled = FALSE;
switch(nEventType)
{
////////////////////////////////////////////////////////////////////////
// Sent by: The engine
// When: The object spawns into the game. This can happen only once,
// regardless of save games.
////////////////////////////////////////////////////////////////////////
case EVENT_TYPE_SPAWN:
{
break;
}
////////////////////////////////////////////////////////////////////////
// Sent by: The engine
// When: A creature enters the trigger
////////////////////////////////////////////////////////////////////////
case EVENT_TYPE_ENTER:
{
object oCreature = GetEventCreator(ev);
int nOnce = GetLocalInt(OBJECT_SELF,TRIGGER_DO_ONCE_A);
if (nOnce == FALSE)
{
SetLocalInt(OBJECT_SELF, TRIGGER_DO_ONCE_A, TRUE);
//Activate the spiders
UT_TeamAppears(TEAM_MY_CREATURE);
}
break;
}
////////////////////////////////////////////////////////////////////////
// Sent by: The engine
// When: A creature exits the trigger
////////////////////////////////////////////////////////////////////////
case EVENT_TYPE_EXIT:
{
object oCreature = GetEventCreator(ev);
break;
}
}
if (!nEventHandled)
{
HandleEvent(ev, RESOURCE_SCRIPT_TRIGGER_CORE);
}
}
Modifié par Sonmeister, 15 mai 2010 - 05:31 .





Retour en haut






