i play around with the Toolset and now im a bit confused. I replayced the plot_core file with my own to display some message. This works with Books an History but not with creatures. I dont know what else i can do here.
#include "log_h"
#include "utility_h"
#include "wrappers_h"
#include "plot_h"
#include "plt_cod_mgc_spirits"
#include "plt_cod_crt_wisp"
int StartingConditional()
{
event evEvent = GetCurrentEvent();
int nType = GetEventType(evEvent);
string strPlot = GetEventString(evEvent, 0);
int nPlot = GetEventInteger(evEvent, 1);
int nResult = FALSE; // return value for DEFINED GET events (see bottom)
object oHero = GetHero();
if (nType == EVENT_TYPE_SET_PLOT)
{
DisplayStatusMessage ("EVENT_TYPE_SET_PLOT", 0xFF62FF);
if (strPlot == PLT_COD_CRT_WISP)
{ // SetPlot [cod_crt_wisp] [COD_CRT_WISP_UNLOCKED] -> [1]
DisplayStatusMessage ("CODEX WISP Get!", 0xFF62FF);
}
if (strPlot == PLT_COD_MGC_SPIRITS)
{
DisplayStatusMessage ("CODEX SPIRITS Get!", 0xFF62FF );
}
}
if (nType == EVENT_TYPE_GET_PLOT)
{
DisplayStatusMessage ("EVENT_TYPE_GET_PLOT", 0xFF62FF);
}
plot_OutputDefinedFlag(evEvent, nResult);
return nResult;
}
What is wrong here?
EDIT:
Start a new Game while using this plot_core.ncs and chose a mage. When you are in the Fade then look at the Statue to see that this works and then kill a Wisp. Here goes something wrong i think ...
And sorry for my english (=
SOLTION:
#include "log_h"
#include "utility_h"
#include "wrappers_h"
#include "events_h"
#include "2da_constants_h"
#include "bhm_constants_h"
#include "plt_bhm600pt_harrowing"
// -------------------------------------------------
// Plot to check if Creature already slain
// -------------------------------------------------
#include "plt_test_plot"
// -------------------------------------------------
// Name Strings of Creatures to check
// -------------------------------------------------
string strWisp = "bhm600cr_wispwraith";
void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
string sDebug;
object oPC = GetHero();
object oParty = GetParty(oPC);
int nEventHandled = FALSE;
string strCreature = ToString(OBJECT_SELF); // make OBJECT_SELF a string
int intCreature = StringToInt (strCreature); // convert int to string
switch(nEventType)
{
case EVENT_TYPE_DEATH:
{
if (strCreature == strWisp)
{
int intWispFlag = WR_GetPlotFlag(PLT_TEST_PLOT, WISP_TEST);
if (intWispFlag == 1) {
DisplayStatusMessage ("Killed Again!", 0xFF62FF); // hard-to-overlook-color
}
else {
DisplayStatusMessage ("First Kill!", 0xFF62FF);
WR_SetPlotFlag(PLT_TEST_PLOT, WISP_TEST, 1, TRUE);
}
}
break;
}
}
if (!nEventHandled)
{
HandleEvent(ev, RESOURCE_SCRIPT_CREATURE_CORE);
}
}
Here and there some Code that is not needed.
Modifié par yokmp, 18 février 2011 - 01:48 .





Retour en haut






