Aller au contenu

Photo

Solved - What is the code to set Plot Flags in a script?


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
Alexandus

Alexandus
  • Members
  • 438 messages
I have been endeavoring to set a Plot Flag via a script, supposed to fire off when the player acquires an item, which has the tag of "blooditem". The item in question does have the ITEM_SENT_ACQUIRED_EVENT variable set to 1.

The Plot tag is "bloodquest1plot".

Here is the code snippet from my module script:

case EVENT_TYPE_CAMPAIGN_ITEM_ACQUIRED:
        {
           object oItemAcquired = GetEventObject(ev, 0);
           if (oItemAcquired == (GetObjectByTag("blooditem")))
            {
             object oHero = GetHero();
             object oParty = GetParty(oHero);
             SetPartyPlotFlag(oParty,"bloodquest1plot",1,TRUE);
            }
           break;
        }

Any suggestions and/or advice would be greatly appreciated.

Modifié par Alexandus, 05 mars 2010 - 03:04 .


#2
Bibdy

Bibdy
  • Members
  • 1 455 messages
There should be one in wrappers_h. WR_SetPlogFlag() or something.

#3
Alexandus

Alexandus
  • Members
  • 438 messages
My thanks. Updated code just in case anyone is having the same problem:



#include "plt_bloodquest1plot"



case EVENT_TYPE_CAMPAIGN_ITEM_ACQUIRED:

{

object oItemAcquired = GetEventObject(ev, 0);

if (oItemAcquired == (GetObjectByTag("blooditem")))

{

WR_SetPlotFlag(PLT_BLOODQUEST1PLOT, FLAG_1, TRUE);

}

break;

}