Here's a copy of the plot script. I can't see anything wrong except maybe at the very bottom I may need another break? What do you think?
//--------------------------------------------------------------------------------------------------
/*
Plot script
*/
//--------------------------------------------------------------------------------------------------
#include "utility_h"
#include "wrappers_h"
#include "plot_h"
#include "utility_h"
#include "wrappers_h"
#include "pre_objects_h"
#include "sys_ambient_h"
#include "plt_ds_spiritslayer"
// The tag of the destination
const string SS_AREA_TAG = "ds_area_three_sisters";
const string SS_FINAL_AREA = "ds_area_spiritslayer_final";
const string SS_BFORFINAL_AREA = "ds_area_spiritslayer_b4finl";
//const string SS_TOMBS = "ds_area_threesis_under"; _
// The tag of the waypoint
const string SS_AREA_WP_TAG = "entry_3sisters";
const string DS_THREE_PIN = "ds_three_sis_pin";
const string SPIRITS_WP = "four_spirit_entry";
const string DEMONSLAIR_WP = "entry_demons_lair";
const string TOMBS_WP = "three_sis_entry";
// The tag of creatures for this plot
const string DS_ARIOCH = "ds_arioch";
const string DS_ARIOCH_DEMON = "ds_arioch_demon";
const int SHAPESHIFT_IN_SMOKE = 1135;
void main()
{
// deconstruct event
event evCurrent = GetCurrentEvent();
int nEventType = GetEventType(evCurrent);
int nPlotFlag = GetEventInteger(evCurrent, 1);
// common
object oHero = GetHero();
object oDemon_form = GetObjectByTag("ds_arioch_demon");
object oArioch = GetObjectByTag("ds_arioch");
object oElric = GetObjectByTag("ds_cr_elric");
object oSpiritslayer = GetObjectByTag("sword_spiritslayer");
switch(nEventType)
{
case EVENT_TYPE_SET_PLOT:
{
int nNewValue = GetEventInteger(evCurrent, 2); // value to be assigned
int nOldValue = GetEventInteger(evCurrent, 3); // value currently assigned
switch(nPlotFlag)
{
case SPIRITSLAYER_ACCEPT:
{
object oElric = GetObjectByTag("ds_cr_elric");
SetPlotGiver(oElric, FALSE);
// Activate way point
object oMapPinRoad = GetObjectByTag(DS_THREE_PIN);
WR_SetWorldMapLocationStatus(oMapPinRoad, WM_LOCATION_ACTIVE);
break;
}
case SPIRITSLAYER_RETAINED:
{
break;
}
case SPIRITSLAYER_DONE:
{
break;
}
case SPIRITSLAYER_KEEP:
{
break;
}
case SPIRITSLAYER_ELRIC_FOLLOWER:
{
object oElric = GetObjectByTag("ds_cr_elric");
UT_HireFollower(oElric, TRUE);
break;
}
case FIRE_ELRIC:
{
object oElric = GetObjectByTag("ds_cr_elric");
UT_FireFollower(oElric, TRUE, TRUE);
Safe_Destroy_Object(oElric,2);
break;
}
case SPIRITSLAYER_DEMONLORD_DEAD:
{
break;
}
case SPIRITSLAYER_ARIOCH_TRANSFORM: // Arioch transforms into a demon
{
location lArioch = GetLocation(oArioch);
Engine_ApplyEffectAtLocation(EFFECT_DURATION_TYPE_INSTANT, EffectVisualEffect(90054), lArioch);
WR_SetObjectActive(oArioch, FALSE, 1, SHAPESHIFT_IN_SMOKE); //Set human form inactive
//fire a VFX and these two line must be together
location lDemon_form = GetLocation(oDemon_form);
Engine_ApplyEffectAtLocation(EFFECT_DURATION_TYPE_INSTANT, EffectVisualEffect(90047), lDemon_form);
WR_SetObjectActive(oDemon_form, TRUE, 1, SHAPESHIFT_IN_SMOKE); //Set Arioch Demon active
break;
}
case SENT_TO_THREE_SISTERS:
{
UT_DoAreaTransition(SS_AREA_TAG, SS_AREA_WP_TAG);
break;
}
}
break;
}
}
}
Modifié par Sonmeister, 11 février 2012 - 02:57 .