/////////////////////////////////////////////////////////////////////
// Problem solved with the following script. The problems I had //
// were #1 - script was not associated with the area, it is now, //
// and #2 - I did not have the creatures I was trying to spawn //
// loaded as a resource (on the left window in the editor screen). //
// To solve that, I stuck the creature types I was trying to //
// spawn with CreateObject in a sealed room...I am sure there is //
// better way, but that worked - condition met, bad guys spawn //
//////////////////////////////////////////////////////////////////
#include "events_h"
#include "plt_dmo001_party_plot"
#include "wrappers_h"
void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
switch(nEventType)
{
case EVENT_TYPE_TEAM_DESTROYED:
{
if(GetEventInteger(ev,0) == 3) //3 is the team number expected to be destroyed
{
WR_SetPlotFlag(PLT_DMO001_PARTY_PLOT, TEAM3_DESTROYED, TRUE); //Trigger Journal Update (debug)
object oWaypoint1 = GetObjectByTag("spawn_001"); //spawn 1st creature at waypoint tag spawn_001
location lWaypoint1 = GetLocation(oWaypoint1);
object oOgre_Boss = CreateObject(OBJECT_TYPE_CREATURE, R"DMO001_OGRE_BOSS.UTC", lWaypoint1);
object oWaypoint2 = GetObjectByTag("spawn_002"); //spawn 2nd creature at waypoint tag spawn_002
location lWaypoint2 = GetLocation(oWaypoint2);
object oOgre_Boss2 = CreateObject(OBJECT_TYPE_CREATURE, R"dmo001_ogre_boss.utc", lWaypoint2);
object oWaypoint3 = GetObjectByTag("spawn_003");//spawn 3rd creature at waypoint tag spawn_003
location lWaypoint3 = GetLocation(oWaypoint3);
object oGenlock_Emissary1 = CreateObject(OBJECT_TYPE_CREATURE, R"dmo001_genlock_emissary_bal.utc", lWaypoint3);
object oWaypoint4 = GetObjectByTag("spawn_004");//spawn 4th creature at waypoint tag spawn_004
location lWaypoint4 = GetLocation(oWaypoint4);
object oGenlock_Emissary2 = CreateObject(OBJECT_TYPE_CREATURE, R"dmo001_genlock_emissary_bal.utc", lWaypoint4);
}
break;
}
}
HandleEvent(ev, RESOURCE_SCRIPT_AREA_CORE);
}
EVENT_TEAM_DESTROYED
Started by
recklezzrogue
, Mar 01 2010 10:43 AM
No replies to this topic
#1
Posted 01 March 2010 - 10:43 AM



Sign In
Create Account
Back to top








