Jump to content

Home

On enter scripts and booleans


Canderis

Recommended Posts

Posted

void main () 
{
  SendMessageToPC(OBJECT_SELF,"I Fired");

  if (GetGlobalBoolean("EXQ_EV1") == TRUE) { 
       SendMessageToPC(OBJECT_SELF,"I Fired2");


    }
  else
    {
       SendMessageToPC(OBJECT_SELF,"I Fired3");

    }


       SendMessageToPC(OBJECT_SELF,"I Fired4");
}

 

Why do none of those feedback messages arrive but if i put code in to remove an npc in the conditional it removes them? Also it seems to always remove them when the condition should be false by default.

Posted


void main () 
{

  object oPC = GetFirstPC();
  object oCaller = GetObjectByTag("n_db2");


  if (!GetGlobalBoolean("EXQ_EV1")) { 

      AssignCommand(oCaller, ActionStartConversation(oPC, "exq_dlg01"));
      SetGlobalBoolean("EXQ_EV1", TRUE);

    }
  else
    {
       DestroyObject(GetObjectByTag("n_db1"));
       DestroyObject(GetObjectByTag("n_db2"));
       DestroyObject(GetObjectByTag("n_db3"));
       SetLocked(GetObjectByTag("m55aa_elv01"),FALSE);
       SendMessageToPC(GetFirstPC(),"I Fired2");
    }


       SendMessageToPC(GetFirstPC(),"I Fired1");
}

 

So this is the new version of the code, now when this fires, it should be doing the if not the else, the module loads up black. Any ideas?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...