Aller au contenu

Photo

Controlling interactivity through plot scripts - help!


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

#1
wyvern14

wyvern14
  • Members
  • 107 messages
I fail at scripting stuff, no background in C++ or nothing, but I'd love to make this work. Context : once a flag goes on, the chest to loot becomes interactive. Later on, once another plot flag goes on, the door becomes useable and interactive. Both my placeables have customized tags for this. Compile is currently crying because of text underlined  (aka object oChest = GetObjectByTag("wh_fest_fur_chest_active");) and I can't for the life of me figure out WHY :(


#include "log_h"
#include "utility_h"
#include "wrappers_h"
#include "plot_h"

#include "plt_wh_fest_fur_quest"
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 MUST_LOOT_CHEST:
        (
        object oChest = GetObjectByTag("wh_fest_fur_chest_active");       
        SetObjectInteractive(oChest, TRUE);
        break;
        )
   
   
   
    case SPOKE_TO_DAEGHUN:
        (
        object oDoor = GetObjectByTag("wh_fh_1_door_outside");
        SetObjectInteractive(oDoor, TRUE);
        break;
        )

   
    )
    )
    plot_OutputDefinedFlag(eParms, nResult);

    return nResult;
}

Modifié par wyvern14, 12 décembre 2009 - 02:21 .


#2
wyvern14

wyvern14
  • Members
  • 107 messages
Nobody? :(

#3
Obadiah

Obadiah
  • Members
  • 5 739 messages
I haven't tried stripting as yet, but could it because of the "(" instead of "{" in the case statements?

#4
wyvern14

wyvern14
  • Members
  • 107 messages
OMG... Huge resolution for the loss, I did not even notice the difference. Now it works, rofl, I feel like a dummy :)



Thank you, I learned something today and the script compiles perfectly!