I tried adding it to my area spawn/port script but it doesn't work. Probably because I have done something wrong
#include "events_h"
#include "var_constants_h"
#include "wrappers_h"
void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
string sDebug;
int nEventHandled = FALSE;
switch(nEventType)
{
case EVENT_TYPE_AREALOAD_PRELOADEXIT:
{
object oWaypoint = GetObjectByTag("test");
location lWaypoint = GetLocation(oWaypoint);
object o = CreateObject(OBJECT_TYPE_CREATURE, R"paladin_test.utc", lWaypoint);
}
break;
}
switch(nEventType)
{
case EVENT_TYPE_SET_GAME_MODE:
{
int nGameMode = GetEventInteger(ev, 0);
if ( nGameMode == GM_DEAD )
{
DoAreaTransition("arena", "start");
nEventHandled = TRUE;
}
break;
}
switch(nEventType)
{
case EVENT_TYPE_TEAM_DESTROYED:
{
DoAreaTransition("arena", "duels");
nEventHandled = TRUE; //set this if no further action is required for this event
break;
}
}
if (!nEventHandled) //If this event wasn't handled by this script, let the core script try
{
HandleEvent(ev, RESOURCE_SCRIPT_AREA_CORE);
}
}
}





Retour en haut






