Jump to content

Scripting issues


Caldarin

Recommended Posts

so I'm trying to set a trigger to only go off once a certain plot flag is set... here's the script I'm trying to use

 

#include "events_h"

#include "global_objects_h"

#include "utility_h"

#include "wrappers_h"

#include "plt_late_breakfast"

void main ()

{

event ev = GetCurrentEvent();

int nEventType = GetEventType(ev);

int bEventHandled = FALSE;

if(PLT_LATE_BREAKFAST, RETURN_TO_VILLAGE == TRUE)

{

 

switch (nEventType)

{

case EVENT_TYPE_ENTER:

{

object oCreature = GetEventCreator(ev);

if(GetObjectActive(OBJECT_SELF)

&& IsPartyMember(oCreature))

{

resource rCutscene = R"edwin_dies.cut";

CS_LoadCutscene(rCutscene);

SetObjectActive(OBJECT_SELF, FALSE);

}

}

break;

}

if (!bEventHandled) //If this event wasn't handled by this script, let the core script try

{

HandleEvent(ev, RESOURCE_SCRIPT_TRIGGER_CORE);

}

}

 

}

 

 

 

when I try to compile, it gives me "No right bracket on expression" for the 1st if statement (the If(PLT etc))

 

unless I'm missing something, my brackets match up... why is this coming up?

Link to comment
Share on other sites

  • 3 weeks later...

if(PLT_LATE_BREAKFAST, RETURN_TO_VILLAGE == TRUE)

 

Because this is not a valid if condition. You probably meant something like "if (WR_GetPlotFlag(PLT_LATE_BREAKFAST, RETURN_TO_VILLAGE) == TRUE)", which checks the return value of the WR_GetPlotFlag function call.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...