Is this script always there in the background? When/how does it get fired?
I could just add a script to the conversation line, but that's not how the Demo does it. Here's what I have:
#include "log_h"
#include "utility_h"
#include "wrappers_h"
#include "plot_h"
#include "plt_rtb_plot1" // my plot
#include "rtb_script_constants" // FATHERS_SWORD_R constant etc
int StartingConditional()
{
event eParms = GetCurrentEvent();
int nType = GetEventType(eParms);
string strPlot = GetEventString(eParms, 0);
int nFlag = GetEventInteger(eParms, 1);
object oParty = GetEventCreator(eParms);
object oConversationOwner = GetEventObject(eParms, 0);
int nResult = FALSE;
object oPC = GetHero();
plot_GlobalPlotHandler(eParms);
if(nType == EVENT_TYPE_SET_PLOT)
{
int nValue = GetEventInteger(eParms, 2);
int nOldValue = GetEventInteger(eParms, 3);
switch(nFlag)
{
case SPOKEN_JOHN:
{
if (!WR_GetPlotFlag(PLT_RTB_PLOT1,SPOKEN_JOHN))
{
UT_AddItemToInventory(FATHERS_SWORD_R);
break;
}
}
case SWORD_RETURNED:
{
UT_RemoveItemFromInventory(FATHERS_SWORD_R);
break;
}
}
}
plot_OutputDefinedFlag(eParms, nResult);
return nResult;
}
Modifié par st4rdog, 16 novembre 2009 - 07:06 .





Retour en haut






