Jump to content

Home

"Adding Planets To Galaxy Map in TSL" - k_inc_hawk.nss problems...


Darth InSidious

Recommended Posts

Using the modifications suggested by stoffe-mkb- in this tutorial, I keep getting compiling errors at the start of the last string to be modified. Whenever I try to compile scripts using this version of k_inc_hawk, I get this problem.

 

It makes it impossible to leave the ship upon arrival, there is no change in skybox, and the holographic world doesn't appear...

 

??? :indif:

Link to comment
Share on other sites

Using the modifications suggested by stoffe-mkb- in this tutorial, I keep getting compiling errors at the start of the last string to be modified. Whenever I try to compile scripts using this version of k_inc_hawk, I get this problem.

 

What compilation error are you getting? Hard to tell what could be wrong without knowing that. :)

 

Make sure all ( end with a ) and all { have a corresponding }, and that all statements end with a semicolon.

Link to comment
Share on other sites

Using the modifications suggested by stoffe-mkb- in this tutorial, I keep getting compiling errors at the start of the last string to be modified. Whenever I try to compile scripts using this version of k_inc_hawk, I get this problem.

 

It makes it impossible to leave the ship upon arrival, there is no change in skybox, and the holographic world doesn't appear...

 

??? :indif:

 

I don't know whether a working version's source will help you. But I'll post it here, just in case.

 

k_inc_hawk from M4-78RP (I had it to hand):

 

// k_inc_hawk
/*
   Pavlos:
   The custom include file for functions relating to the Ebon Hawk.
   The script "k_sup_galaxymap" was very cluttered. I wasn't in the
   mood to trek through the script, so one day I decided to put all
   of those functions stuffed up at the top into the include file
   that Obsidian had seemingly forgotten about.
*/
// Created By: Obsidian Entertainment
// Editing By: Pavlos

//VARIABLES ======================================

int VASH_ON_KORRIBAN = 0;
int VASH_WHERE_ARE_YOU = 1; //The player has found the datapad
int VASH_THERE_YOU_ARE = 2; //The player has found and decrypted the datapad

int CHOSE_T3M4 = 8; //The player has chosen T3-M4 to enter 802DRO
int CHOSE_GOTO = 3; //The player has chosen HK-47 to enter 802DRO
int CHOSE_HK47 = 5; //The player has chosen GO-TO to enter 802DRO

int TASK_COMPLETE = -1; //The droid party member has successfully completed his task

//VARIABLES ======================================


//DECLARATIONS ===================================

//A wrapper to check if the creature in question is a droid
//int HAW_GetIsDroid(object oNPC);

//Returns a value for the current world that the Ebon Hawk is on
int GetCurrentPlanet();

//The function for the Red Eclipse attack on the EH. This causes all the thugs to become neutral
void StopCombat();

//Another function specifically for the Red Eclipse attack. This destroys all the thugs.
void ClearEnemies();

//Simple function: Destroys Visas in both modes: attacker and lying on bed.
void DestroyVisas();

//Does the custom spawn in of the NPC in question (See k_oei_hench_inc)
void DoSpecialReset(object oNPC, string sModuleName);

//Does the custom spawn in for the Remote (See k_oei_hench_inc)
void DoSpecialPuppetReset(object oNPC, string sModuleName);

//A batch effect version of "DoSpecialReset()" spawns ALL NPCs that are available back to their spots
//Useful for cleaning up after cutscenes.
void ResetEbonHawk();

//Essentially clears all actions and animations. Stops T3 from "walking" around.
void TurnOffCutsceneMode(object oNPC);

//Removes all NPCs from the Ebon Hawk. DO NOT USE UNLESS YOU UNDERSTAND THE IMPLICATIONS
void ClearEbonHawk();

//Sets the background animation for the Ebon Hawk cockpit
void SetBackground();

//Sets the correct floating hologram in the centre of the Ebon Hawk
void SetHologramWorld();

//MOVED FROM K_SUP_GALAXYMAP
//Sets up the Ebon Hawk for the Nar Shaddaa introduction scene
void DoFirst301();

//Sets up the Ebon Hawk for the Korriban introduction scene
void DoFirst701();

//Tells the game to start cutscenes and plays the movies 
void DoPlanetChange();

//Sets the party selection GUI up so that only droid party members may be
//selected. I do not believe this is going to be used anymore.
void HAW_SetDroidsOnly();

//Sets the Global Number "800_NPC_SELECT" to the correct value
void HAW_SetWhichDroid();

//Switches the player character to the droid in question
void HAW_SwitchToDroid();

//Switches the player character back to the player created one
void HAW_SwitchToPlayer();

//Sets up the Ebon Hawk discussion scene for the start
void HAW_DoFirst801();

//DECLARATIONS ===================================


#include "k_inc_glob_party"
#include "k_oei_hench_inc"


//FUNCTIONS ======================================

//:://////////////////////////////////////////////
//::int GetCurrentPlanet()
//:://////////////////////////////////////////////
/*
   Returns a planet constant based on the background
   shown in the Hawk's cockpit. I wonder why they
   didn't make use of the already existing
   K_CURRENT_PLANET Global Numeric.
*/
//:://////////////////////////////////////////////
//::Created By: Obsidian Entertainment
//:://////////////////////////////////////////////

int GetCurrentPlanet()
{
   int nRoomAnimation = GetGlobalNumber("003EBO_BACKGROUND");

   switch(nRoomAnimation)
   {
       case 0://106PER
       {
           return PLANET_EBON_HAWK;
       }break;
       case 1://201TEL
       {
           return 10; //Pavlos: Citadel Station doesn't have a constant defined in nwscript
       }break;
       case 2://262TEL
       {
           return PLANET_TELOS;
       }break;
       case 3://301NAR
       {
           return PLANET_NAR_SHADDAA;
       }break;
       case 4://401DXN
       {
           return PLANET_DXUN;
       }break;
       case 5://601DAN
       {
           return PLANET_DANTOOINE;
       }break;
       case 6://701KOR
       {
           return PLANET_KORRIBAN;
       }break;
       case 7://801DRO
       {
           return PLANET_M4_78;
       }break;
       case 8://space
       {
           return PLANET_EBON_HAWK;
       }break;
       case 9://901MAL
       {
           return PLANET_MALACHOR_V;
       }break;
       case 10://Hyperspace
       {
           return PLANET_EBON_HAWK;
       }break;
       default://error
       {
           return PLANET_EBON_HAWK;
       }
   }
   return PLANET_EBON_HAWK;
}

//:://////////////////////////////////////////////
//::void StopCombat()
//:://////////////////////////////////////////////
/*
   Specific to the Red Eclipse attack on the
   Ebon Hawk. This causes all the thugs and the
   Captain to surrender to the player and tells them
   to stop fighting.

   I may go back and add functionality for a second
   attack on the Hawk if we happen to plan one in.
*/
//:://////////////////////////////////////////////
//::Created By: Obsidian Entertainment
//:://////////////////////////////////////////////

void StopCombat()
{
   object oPC = GetFirstPC();
   CancelCombat(oPC);

   int i;
   object oEnemy;

   for(i = 0;i < 20;i++)
   {
       oEnemy = GetObjectByTag("REThug4", i);
       if(GetIsObjectValid(oEnemy))
       {
           ChangeToStandardFaction( oEnemy,STANDARD_FACTION_NEUTRAL );
           CancelCombat(oEnemy);
       }
       oEnemy = GetObjectByTag("REThug5", i);
       if(GetIsObjectValid(oEnemy))
       {
           ChangeToStandardFaction( oEnemy,STANDARD_FACTION_NEUTRAL );
           CancelCombat(oEnemy);
       }
   }
   //take care of the captain
   oEnemy = GetObjectByTag("RECapt");
   if(GetIsObjectValid(oEnemy))
   {
       ChangeToStandardFaction( oEnemy,STANDARD_FACTION_NEUTRAL );
       CancelCombat(oEnemy);
   }
}

//:://////////////////////////////////////////////
//::void ClearEnemies()
//:://////////////////////////////////////////////
/*
   Another function entirely specific to the Red
   Eclipse attack on the Hawk. This causes all
   the thugs and the captain to be destroyed...
   I think an evil laugh is required there.

   I may go back and add functionality for a second
   attack on the Hawk if we happen to plan one in.
*/
//:://////////////////////////////////////////////
//::Created By: Obsidian Entertainment
//:://////////////////////////////////////////////

void ClearEnemies()
{
   int i;
   object oEnemy;

   for(i = 0;i < 20;i++)
   {
       oEnemy = GetObjectByTag("REThug4", i);
       if(GetIsObjectValid(oEnemy))
           DestroyObject(oEnemy);

       oEnemy = GetObjectByTag("REThug5", i);
       if(GetIsObjectValid(oEnemy))
           DestroyObject(oEnemy);
   }
   //take care of the captain
   oEnemy = GetObjectByTag("RECapt");
   if(GetIsObjectValid(oEnemy))
           DestroyObject(oEnemy);
}

//:://////////////////////////////////////////////
//::void DestroyVisas()
//:://////////////////////////////////////////////
/*
   This function is quite simple. Seeing as how
   she has two *.utc files before joining you this
   function tagets both of them and if one is valid
   destroys it. This clears everything up perfectly.

   VisasBed = The version of Visas lying on the
              bed in the medical section of the
              Ebon Hawk.
   VisasCut = The hostile version of Visas whom you
              walk in on while she is meditating.
*/
//:://////////////////////////////////////////////
//::Created By: Obsidian Entertainment
//:://////////////////////////////////////////////

void DestroyVisas()
{
   object oVisasTemp2 = GetObjectByTag("VisasBed");
   if(GetIsObjectValid(oVisasTemp2))
   {
       DestroyObject(oVisasTemp2, 0.0, TRUE);
   }

   object oVisasTemp = GetObjectByTag("VisasCut");
   if (GetIsObjectValid(oVisasTemp))
   {
       DestroyObject(oVisasTemp, 0.0, TRUE);
   }
}

//:://////////////////////////////////////////////
//::void DoSpecialReset(object oNPC, string sModuleName)
//:://////////////////////////////////////////////
/*
   A nice little function which causes the object oNPC
   to reset to their original place on the Ebon Hawk.
   This uses the DoNPCSpawnIn() for the NPC in
   question. Useful for cleaning up after cutscenes.
*/
//:://////////////////////////////////////////////
//::Created By: Obsidian Entertainment
//:://////////////////////////////////////////////

void DoSpecialReset(object oNPC, string sModuleName)
{
   if(GetNPCConstant(GetTag(oNPC)) == NPC_ATTON)
   {
       AurPostString("Resetting Atton 1",15,19,10.0);
       DoAttonSpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_BAO_DUR)
   {
       DoBaoDurSpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_CANDEROUS)
   {
       DoMandSpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_DISCIPLE)
   {
       DoDiscipleSpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_G0T0)
   {
       DoG0T0SpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_HANDMAIDEN)
   {
       DoHandmaidenSpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_HANHARR)
   {
       DoHanharrSpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_HK_47)
   {
       DoHK47SpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_KREIA)
   {
       DoKreiaSpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_MIRA)
   {
       DoMiraSpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_T3_M4)
   {
       DoT3M4SpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_VISAS)
   {
       DoVisasMarrSpawnIn(oNPC, sModuleName);
   }
   else
   {
       AurPostString("ERROR: Invalid PartyMember",15,15,10.0);
   }
}

//:://////////////////////////////////////////////
//::DoSpecialPuppetReset(object oNPC, string sModuleName)
//:://////////////////////////////////////////////
/*
   Similar to the above. Just resets the Remote
   to his(?) default position in the Hawk.
*/
//:://////////////////////////////////////////////
//::Created By: Obsidian Entertainment
//:://////////////////////////////////////////////

void DoSpecialPuppetReset(object oNPC, string sModuleName)
{
   if(GetPuppetConstant(GetTag(oNPC)) == PUP_SENSORBALL)
   {
       DoRemoteSpawnIn(oNPC, sModuleName);
   }
}

//:://////////////////////////////////////////////
//::void ResetEbonHawk()
//:://////////////////////////////////////////////
/*
   A nice little function which causes all avaiable
   NPCs (And Remote) to reset to their original
   place on the Ebon Hawk. This uses the
   DoNPCSpawnIn() for the NPC in question. VERY
   useful for cleaning up after cutscenes.
*/
//:://////////////////////////////////////////////
//::Created By: Obsidian Entertainment
//:://////////////////////////////////////////////

void ResetEbonHawk()
{
   AurPostString("k_inc_hawk: Resetting Ebon Hawk", 15, 18, 10.0);
   int i;

   string sTag;
   object oNPC;
   for(i = 0; i < 12; i++)
   {
       sTag = GetNPCTag( i );
       oNPC = GetObjectByTag(sTag);
       if(GetIsObjectValid(oNPC))
       {
           object oWP = GetObjectByTag("WP_gspawn_" + sTag);
           if(GetIsObjectValid(oWP))
           {
               AssignCommand(oNPC, ClearAllActions());
               AssignCommand(oNPC, ActionJumpToLocation(GetLocation(oWP)));
               DelayCommand(0.2, DoSpecialReset(oNPC, "003EBO"));
           }
           else
           {
               AurPostString("RESET EBONHAWK: invalid waypoint!", 15,15,10.0);
           }
       }
   }

   object oRemote = GetObjectByTag("remote");
   if(GetIsObjectValid(oRemote))
   {
       object oWP = GetObjectByTag("WP_gspawn_" + sTag);
       if(GetIsObjectValid(oWP))
       {
           AssignCommand(oNPC, ClearAllActions());
           AssignCommand(oNPC, ActionJumpToLocation(GetLocation(oWP)));
           DelayCommand(0.2, DoSpecialPuppetReset(oNPC, "003EBO"));
       }
       else
       {
           AurPostString("RESET EBONHAWK: invalid waypoint!", 15,15,10.0);
       }
   }
   //AWD-OEI 10/29/2004
   DestroyVisas();
}

//:://////////////////////////////////////////////
//::void TurnOffCutsceneMode(object oNPC)
//:://////////////////////////////////////////////
/*
   Essentially clears all actions and stops
   object oNPC from walking their waypoints.
   Undoubtedly this was made when they realised
   T3-M4 would continue to zoom around the Hawk
   when he wasn't supposed to.
*/
//:://////////////////////////////////////////////
//::Created By: Obsidian Entertainment
//:://////////////////////////////////////////////

void TurnOffCutsceneMode(object oNPC)
{
   AssignCommand(oNPC, ClearAllActions());
   //waypoints on
   //AssignCommand(oPartyMember, GN_SetSpawnInCondition(SW_FLAG_WAYPOINT_DEACTIVATE, FALSE));
   //AssignCommand(oPartyMember, GN_WalkWayPoints());

   //waypoints off
   AssignCommand(oNPC, GN_SetSpawnInCondition(SW_FLAG_WAYPOINT_DEACTIVATE, TRUE));
   AssignCommand(oNPC, ActionPlayAnimation(ANIMATION_LOOPING_PAUSE, 1.0, -1.0));//clear animations
}

//:://////////////////////////////////////////////
//::void ClearEbonHawk()
//:://////////////////////////////////////////////
/*
   Destroys all party members and the remote.
   DO NOT USE UNLESS YOU UNDERSTAND THE IMPLICATIONS
*/
//:://////////////////////////////////////////////
//::Created By: Obsidian Entertainment
//:://////////////////////////////////////////////

void ClearEbonHawk()
{
   AurPostString("k_inc_hawk: ClearEbonHawk", 15, 21, 10.0);
   int i;
   int bOnXbox = GetIsXBox();

   string sTag;
   object oNPC;
   for(i = 0; i < 12; i++)
   {
       sTag = GetNPCTag( i );
       oNPC = GetObjectByTag(sTag);
       if(GetIsObjectValid(oNPC))
       {
           //SaveNPCByObject(i , oNPC);
           DestroyObject(oNPC, 0.0, bOnXbox); //Pavlos: Have a fade effect while on the Xbox?! What on earth is the point in that check?!
       }
   }
   object oRemote = GetObjectByTag("remote");
   if(GetIsObjectValid(oRemote))
   {
       //SavePUPByObject(PUP_SENSORBALL, oRemote);
       DestroyObject(oRemote, 0.0, bOnXbox);
   }
}

//:://////////////////////////////////////////////
//::void SetBackground()
//:://////////////////////////////////////////////
/*
   Sets the Room animation for the "003EBOq" model
   to the correct value through a global number.

  0  = Peragus
  1  = Telos (Citadel Station)
  2  = Telos (Atris' Ice Palace)
  3  = Nar Shaddaa
  4  = Dxun
  5  = Dantooine
  6  = Korriban
  7  = M4-78
  8  = Space
  9  = Malachor
  10 = Hyperspace <-- Pavlos' favourite

   USES NUMERIC "003EBO_BACKGROUND"
*/
//:://////////////////////////////////////////////
//::Created By: Obsidian Entertainment
//:://////////////////////////////////////////////

void SetBackground()
{
   string sRoom = "003EBOq";
   int nRoomAnimation = GetGlobalNumber("003EBO_BACKGROUND");

   switch(nRoomAnimation)
   {
       case 0://106PER
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP01;
       }break;
       case 1://201TEL
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP02;
       }break;
       case 2://262TEL
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP03;
       }break;
       case 3://301NAR
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP04;
       }break;
       case 4://401DXN
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP05;
       }break;
       case 5://601DAN
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP06;
       }break;
       case 6://701KOR
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP07;
       }break;
       case 7://801DRO
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP08;
       }break;
       case 8://space
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP09;
       }break;
       case 9://901MAL
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP10;
       }break;
       case 10://Hyperspace
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP11;
       }break;
       default://error
       {
           AurPostString("EBO ERROR: No background sepcified!",15,15,10.0);
       }
   }
   PlayRoomAnimation(sRoom, nRoomAnimation);
}

//:://////////////////////////////////////////////
//::void SetHologramWorld()
//:://////////////////////////////////////////////
/*
   Sets the correct holographic world to be
   shown in the Ebon Hawk's main hold.

  0  = Peragus
  1  = Telos 
  2  = Telos 
  3  = Nar Shaddaa
  4  = Dxun
  5  = Dantooine
  6  = Korriban
  7  = M4-78 (THIS NEEDS TO BE MADE, GUYS!)
  8  = Nothing
  9  = Nothing
  10 = Nothing

   USES NUMERIC "003EBO_BACKGROUND"
*/
//:://////////////////////////////////////////////
//::Created By: Obsidian Entertainment
//:://////////////////////////////////////////////

void SetHologramWorld()
{
   string sResRef;
   int nCurrentWorld = GetGlobalNumber("003EBO_BACKGROUND");
   switch(nCurrentWorld)
   {
       case 0://106PER
       {
           sResRef = "holo_per";
       }break;
       case 1://201TEL
       {
           sResRef = "holo_tel";
       }break;
       case 2://262TEL
       {
           sResRef = "holo_tel";
       }break;
       case 3://301NAR
       {
           sResRef = "holo_nar";
       }break;
       case 4://401DXN
       {
           sResRef = "holo_dxn";
       }break;
       case 5://601DAN
       {
           sResRef = "holo_dan";
       }break;
       case 6://701KOR
       {
           sResRef = "holo_kor";
       }break;
       case 7://801DRO
       {
           sResRef = "holo_dro"; //Pavlos: Added in this new line to reference the M4-78 
       }break;
       case 8://space
       {
           sResRef = "";
       }break;
       case 9://901MAL
       {
           sResRef = "holo_mal";
       }break;
       case 10://Hyperspace
       {
           sResRef = "";
       }break;
       default://error
       {
           AurPostString("EBO ERROR: No background sepcified!",15,15,10.0);
       }
   }
   object oHoloWorld = GetObjectByTag("hologram");
   if(GetIsObjectValid(oHoloWorld))
       DestroyObject(oHoloWorld);
   if(sResRef != "")
   {
       object oNewHoloWorld = CreateObject(OBJECT_TYPE_PLACEABLE, sResRef, GetLocation(GetObjectByTag("WP_hologram")));
       if(GetIsObjectValid(oNewHoloWorld))
       {
           //AssignCommand ( oNewHoloWorld, ActionPlayAnimation(ANIMATION_PLACEABLE_ANIMLOOP01, 1.0, -1.0));
           DelayCommand( 1.0, AssignCommand ( oNewHoloWorld, ActionPlayAnimation(ANIMATION_PLACEABLE_ANIMLOOP01) ) );
       }
   }
}

//:://////////////////////////////////////////////
//::void DoFirst301()
//:://////////////////////////////////////////////
/*
   Sets up the Ebon Hawk for the Nar Shaddaa intro.
   The dialogue is triggered via tr_301_first.
   For some reason both Obsidian and BioWare used
   triggers to set up this sort of thing... weird
*/
//:://////////////////////////////////////////////
//::Created By: Obsidian Entertainment
//:://////////////////////////////////////////////

void DoFirst301()
{
   NoClicksFor(1.0);
   SetGlobalFadeOut();
   object oPlayer = GetFirstPC();
   object oAtton = GetObjectByTag("atton");
   object oMand = GetObjectByTag("mand");
   object oKreia = GetObjectByTag("kreia");
   object oT3M4 = GetObjectByTag("t3m4");
   object oDisc = GetObjectByTag("disciple");
   object oMaid = GetObjectByTag("handmaiden");

   TurnOffCutsceneMode(oAtton);
   TurnOffCutsceneMode(oMand);
   TurnOffCutsceneMode(oKreia);
   TurnOffCutsceneMode(oT3M4);
   TurnOffCutsceneMode(oDisc);
   TurnOffCutsceneMode(oMaid);

   AssignCommand(oMand, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_301_mand"))));
   AssignCommand(oKreia, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_301_kreia"))));
   AssignCommand(oT3M4, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_301_t3m4"))));
   AssignCommand(oDisc, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_301_disc"))));
   AssignCommand(oMaid, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_301_maid"))));

   SignalEvent(GetArea(oPlayer), EventUserDefined(1));
   AssignCommand(oPlayer, ClearAllActions());
   AssignCommand(oPlayer, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_301_player"))));
}

//:://////////////////////////////////////////////
//::void DoFirst701()
//:://////////////////////////////////////////////
/*
   Sets up the Ebon Hawk for the Korriban intro.
   The dialogue is triggered via tr_301_first.
   For some reason both Obsidian and BioWare used
   triggers to set up this sort of thing... weird
*/
//:://////////////////////////////////////////////
//::Created By: Obsidian Entertainment
//:://////////////////////////////////////////////

void DoFirst701()
{
   NoClicksFor(1.0);
   SetGlobalFadeOut();
   object oPlayer = GetFirstPC();
   object oAtton = GetObjectByTag("mand"); //Pavlos: I don't understand the dev's scripts sometimes... *Frowns*
   object oVisas = GetObjectByTag("visasmarr");
   object oKreia = GetObjectByTag("kreia");

   TurnOffCutsceneMode(oAtton);
   TurnOffCutsceneMode(oKreia);
   TurnOffCutsceneMode(oVisas);

   AssignCommand(oVisas, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_301_mand"))));
   AssignCommand(oKreia, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_301_kreia"))));

   SignalEvent(GetArea(oPlayer), EventUserDefined(1));
   AssignCommand(oPlayer, ClearAllActions());
   AssignCommand(oPlayer, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_301_player"))));
}

//:://////////////////////////////////////////////
//::void DoPlanetChange()
//:://////////////////////////////////////////////
/*
   Plays the movie queue for the planet you are
   travelling to. This is not defined here, however.
   It also tells the game whether or not to
   launch introduction cutscenes.
*/
//:://////////////////////////////////////////////
//::Created By: Obsidian Entertainment
//:://////////////////////////////////////////////

void DoPlanetChange()
{
   if(GetGlobalNumber("401DXN_STARTED") == 1)
   {
       SetGlobalNumber("401DXN_STARTED", 2);
       PlayMovieQueue();
       StartNewModule("003EBO", "WP_PC_WALK_MAP");
   }
   if (GetGlobalNumber("801DRO_STARTED") == 1)//Pavlos: The background isn't set to anything but hyperspace.
   {                                          //We have to use another global for this!
       PlayMovieQueue(); //Pavlos: With the changes made to the movie queue script we can safely add this in.
       SetGlobalNumber("801DRO_STARTED", 2);
       StartNewModule("003EBO", "WP_PC_WALK_MAP");//Pavlos: The scruffiest way you can imagine doing it but it stops compatability issues.
   }                                              //Also prevents icky trigger geometry : /
   else if(GetModuleName() == "001EBO")
   {
       // if we are in tutorial, the galaxy map has different functionality
       SetGlobalNumber ( "001EBO_Movie_End", 1);
       PlayMovie("permov02");//play tutorial
       AssignCommand( GetObjectByTag("Galaxymap"),ActionStartConversation(GetFirstPC(),"outro") );
   }
   else if( (GetGlobalNumber("003EBO_BACKGROUND") == 3)  && !GetGlobalBoolean("301_FIRST_ENTER") && (GetGlobalNumber("301_INTRO_SCENE") == 0) )
   {// first time to nar shadda
       SetGlobalNumber("003EBO_RETURN_DEST",3);
       SetGlobalNumber("301_INTRO_SCENE", 1);
       DoFirst301();
   }
   else if( (GetGlobalNumber("003EBO_BACKGROUND") == 6) && !GetGlobalBoolean("701_FIRST_ENTER") && (GetGlobalNumber("701_INTRO_SCENE") == 0) )
   {//first time to koriban
       SetGlobalNumber("003EBO_RETURN_DEST",6);
       SetGlobalBoolean("701_FIRST_SCENE", TRUE);
       SetGlobalNumber("701_INTRO_SCENE", 1);
       DoFirst701();

       //old module load way below:
       //PlayMovieQueue();
       //StartNewModule("003EBO", "WP_from_outside");
   }
   //AWD-OEI 10-23-2004
   else if((GetGlobalNumber("003EBO_BACKGROUND") == 1) && (!GetGlobalBoolean("201_FIRST_ENTER")))//201 first time
   {//first time to Telos, go ahead and jump to 201
       PlayMovieQueue();
       StartNewModule("201TEL", "WP_from_ebonhawk");
   }
   // 262TEL cutscene triggers (JAB-OEI 10/22/04)
   else if( (GetGlobalNumber("000_Jedi_Found") >= 1) && (GetGlobalNumber("000_Jedi_Found") < 4) && (GetGlobalNumber("000_Atriscs1") == 0) && (GetGlobalBoolean("000_PLAYER_GENDER")))
   {//only if player is male
       PlayMovieQueue();
       SetGlobalNumber("000_Atriscs1",2);
       StartNewModule("262TEL");
   }
   else if( (GetGlobalNumber("000_Jedi_Found") >= 2) && (GetGlobalNumber("000_Jedi_Found") < 4) && (GetGlobalNumber("000_Siscut1") == 0) && (GetGlobalBoolean("000_PLAYER_GENDER")))
   {//only if player is male
       PlayMovieQueue();
       SetGlobalNumber("000_Siscut1",2);
       StartNewModule("262TEL");
   }
   else
   {
       SignalEvent(GetArea(GetFirstPC()), EventUserDefined(1));
       PlayMovieQueue();
   }
}

//:://////////////////////////////////////////////
//::HAW_SetDroidsOnly()
//:://////////////////////////////////////////////
/*
   FUNCTION WILL NOT BE USED

   The original plan for the introduction was to
   select your droid from the party selection screen.
   This quickly fell through when I remembered that
   there is no way of telling the party selection
   GUI to only allow you to select one party member.
*/
//:://////////////////////////////////////////////
//::Created By: Pavlos
//:://////////////////////////////////////////////

void HAW_SetDroidsOnly() {

int i;
for(i = NPC_ATTON; i <= NPC_DISCIPLE; i++) {


       if(GetNPCSelectability(i) != -1) {
       object oNPC = GetPartyMemberByIndex(i);                

           if (!HAW_GetIsDroid(oNPC)) {
               SetNPCSelectability(i, 0);
           }
       }

   }
}

//:://////////////////////////////////////////////
//::HAW_SetWhichDroid
//:://////////////////////////////////////////////
/*
   Sets the Numeric "800_NPC_SELECT" to
   the index of the droid selected. This is so
   that we can  use the global to set the player
   character
*/
//:://////////////////////////////////////////////
//::Created By: Pavlos
//:://////////////////////////////////////////////

void HAW_SetWhichDroid() {

int nParam = GetScriptParameter(1);
switch (nParam) {


                case 1: SetGlobalNumber("800_NPC_SELECT", CHOSE_T3M4); break;
                case 2: SetGlobalNumber("800_NPC_SELECT", CHOSE_GOTO); break;
                case 3: SetGlobalNumber("800_NPC_SELECT", CHOSE_HK47); break;
                case 4: SetGlobalNumber("800_NPC_SELECT", TASK_COMPLETE); break;
   }
}

//:://////////////////////////////////////////////
//::void HAW_SwitchToDroid
//:://////////////////////////////////////////////
/*
   Switches the player character to the droid
   you set in HAW_SetWhichDroid using the global
   "800_NPC_SELECT"
*/
//:://////////////////////////////////////////////
//::Created By: Pavlos
//:://////////////////////////////////////////////

void HAW_SwitchToDroid() {

SwitchPlayerCharacter(GetGlobalNumber("800_NPC_SELECT"));

}

//:://////////////////////////////////////////////
//::HAW_SwitchToPlayer
//:://////////////////////////////////////////////
/*
   Switches the player character to index "-1"
   this means it goes back to the player created
   character.
*/
//:://////////////////////////////////////////////
//::Created By: Pavlos
//:://////////////////////////////////////////////

void HAW_SwitchToPlayer() {

SwitchPlayerCharacter(TASK_COMPLETE);

}

//:://////////////////////////////////////////////
//::void HAW_DoFirst801()
//:://////////////////////////////////////////////
/*
   Sets up the Ebon Hawk for the M4-78 intro.
   To avoid icky trigger geometry and possible
   compatability problems with other mods I did
   things the old fashioned way and edited some
   scripts rather than edit the 003ebo.git file.
*/
//:://////////////////////////////////////////////
//::Created By: Pavlos
//:://////////////////////////////////////////////

void HAW_DoFirst801() {

   NoClicksFor(1.0);
   SetGlobalNumber("801DRO_STARTED" , 3);
   SetGlobalFadeOut();

   object oPlayer = GetFirstPC();
   object oAtton = GetObjectByTag("Atton");
   object oKreia = GetObjectByTag("Kreia");

   TurnOffCutsceneMode(oAtton);
   TurnOffCutsceneMode(oKreia);

   AssignCommand(oKreia, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_kreia_cut_6"))));
   AssignCommand(oAtton, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_PC_WALK_MAP", 0))));
   SignalEvent(GetArea(oPlayer), EventUserDefined(1));
   AssignCommand(oPlayer, ClearAllActions());
   AssignCommand(oPlayer, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_atton_cut_4"))));

   DelayCommand(0.2, AssignCommand(oAtton, ActionStartConversation(oPlayer, "ebo_partychat", 0, 0, 1, "", "", "", "", "", "", 0, (-1), (-1), 1)));
}

//FUNCTIONS ======================================

 

And k_sup_galaxymap:

 

// k_sup_galaxymap.nss
/*
   Universal Script that fires when
   the galaxy map is used.
*/
// Created By: Obsidian Entertainment
// Edited By: Pavlos

#include "k_inc_hawk"

void main()
{
   int nSelected = GetSelectedPlanet();
   int nPrevPlanet = GetCurrentPlanet();

   if(nSelected == -1)
       return;


   // queue up leaving movie
   switch(GetGlobalNumber("003EBO_BACKGROUND"))
   {
       case 0://106PER
       {
           // I don't think we have a movie to play here
       }break;
       case 1://201TEL
       {
           QueueMovie("TelMov02");
           QueueMovie("HypMov01");
       }break;
       case 2://262TEL
       {
           QueueMovie("TelMov14");
           QueueMovie("HypMov01");
       }break;
       case 3://301NAR
       {
           QueueMovie("NarMov02");
           QueueMovie("HypMov01");
       }break;
       case 4://401DXN
       {
           QueueMovie("OndMov04");
           QueueMovie("HypMov01");
       }break;
       case 5://601DAN
       {
           QueueMovie("DanMov02");
           QueueMovie("HypMov01");
       }break;
       case 6://701KOR
       {
           QueueMovie("KorMov02");
           QueueMovie("HypMov01");
       }break;
       case 7://801DRO
       {
           //Pavlos: Changed reference here to "DroMov01" - we have no
           //idea what the other films where to be so we introduced our own naming scheme

           QueueMovie("DroMov01"); 
           QueueMovie("HypMov01");
       }break;
       case 8://space
       {
           QueueMovie("HypMov01");
       }break;
       case 9://901MAL
       {
       }break;
       case 10://Hyperspace
       {
       }break;
   }

   int nPlanet = nSelected;

   /*
    Do other stuff like play movies, do stuff to Ebon Hawk
    we need two movies - the planet that we are leaving, and then the dest planet
    after we get those two string, we can then play the two movies in sequence
    we are setting two variables on the ebon hawk. One is for the background, and the
    other is for the exit module.
   */
   switch(nPlanet)
   {
       case PLANET_PERAGUS:
       {
           AurPostString("ERROR: We should not be able to travel back to peragus.",0,10,5.0);
       }break;
       case 10://citadel station
       {
           SetGlobalNumber("003EBO_RETURN_DEST",1);
           SetGlobalNumber("003EBO_BACKGROUND",1);

           // need to check where we are landing
           QueueMovie("TelMov01");
       }break;
       case PLANET_TELOS://polar region
       {
           SetGlobalNumber("003EBO_RETURN_DEST",2);
           SetGlobalNumber("003EBO_BACKGROUND",2);

           // need to check where we are landing
           QueueMovie("TelMov15");
       }break;
       case PLANET_NAR_SHADDAA:
       {
           SetGlobalNumber("003EBO_RETURN_DEST",3);
           SetGlobalNumber("003EBO_BACKGROUND",3);

           if(GetGlobalBoolean("301_FIRST_ENTER"))//only que this movie if we have been here before
               QueueMovie("NarMov01");
       }break;
       case PLANET_DXUN:
       {

           SetGlobalNumber("003EBO_RETURN_DEST",4);
           SetGlobalNumber("003EBO_BACKGROUND",4);

           QueueMovie("OndMov03");
       }break;
       case PLANET_ONDERON:
       {

           SetGlobalNumber("003EBO_RETURN_DEST",4);
           SetGlobalNumber("003EBO_BACKGROUND",4);

           //first time going to onderon?
           if( (GetGlobalNumber("401DXN_Visited") == 0) && (GetGlobalNumber("401DXN_STARTED") == 0) )
           {
               SetGlobalNumber("401DXN_STARTED", 1);
               SetGlobalNumber("003EBO_RETURN_DEST",8);
               SetGlobalNumber("003EBO_BACKGROUND",8);//set space background
               QueueMovie("OndScn01");
           }
           else
               AurPostString("ERROR!!! GALAXY MAP!",5,15,10.0);
       }break;
       case PLANET_DANTOOINE:
       {
           SetGlobalNumber("003EBO_RETURN_DEST",5);
           SetGlobalNumber("003EBO_BACKGROUND",5);

           QueueMovie("DanMov01");
       }break;
       case PLANET_KORRIBAN:
       {
           SetGlobalNumber("003EBO_RETURN_DEST",6);
           SetGlobalNumber("003EBO_BACKGROUND",6);

           QueueMovie("KorMov01");
       }break;
       case PLANET_M4_78:
       {
           SetGlobalNumber("003EBO_RETURN_DEST", 7);
           SetGlobalNumber("003EBO_BACKGROUND", 7);
           if ((GetGlobalNumber("801DRO_STARTED") == 0))
           {
	   SetGlobalNumber("801DRO_STARTED", 1);
	   SetGlobalNumber("003EBO_BACKGROUND", 10); //Pavlos: We're travelling through hyperspace! Wooo!
	   QueueMovie("DroScn01", 1); //Pavlos:
           }
           else
           {
          QueueMovie("DroMov02", 1);
    }

       }break;
       case PLANET_MALACHOR_V:
       {
           SetGlobalNumber("003EBO_RETURN_DEST",9);
           SetGlobalNumber("003EBO_BACKGROUND",9);

           QueueMovie("MalMov07");
       }break;
   }
   //fade out
   SetBackground();
   ExecuteScript("a_holoworld", GetFirstPC());
   DoPlanetChange();
}

Link to comment
Share on other sites

@stoffe: I don't remember the exact problem, but I think it occurs at SetHologramWorld() . Will check back later with more info. I did check quite thoroughly for brackets and {} being all paired :)

 

@Pavlos: Thanks for showing me the script :) Your edits are good...You may have given me an idea...I'll check whether it works ASAP [- didn't work :( ]

 

The error is on line 370, and it reads 'Syntax error at "(" '. Line 370 is

 int GetCurrentPlanet()

although I tried an unedited version and got the same result...

Link to comment
Share on other sites

The error is on line 370, and it reads 'Syntax error at "(" '. Line 370 is

int GetCurrentPlanet()

although I tried an unedited version and got the same result...

 

Have you checked the line above that line? Often the error is on the line above the one being reported.

 

However if you can't compile even with an unaltered k_inc_hawk straight from the game data the problem lies either in your script using the include file, or you are trying to compile it with nwscript.nss from the wrong game. That include file compiles without any problems on my end at least.

Link to comment
Share on other sites

Okay...I tried re-doing this with a new nwscript, and got the same error. I get no errors for the individual scripts though, just for k_inc_hawk.nss ...

 

Here is the version I'm using:

 


//:: k_inc_hawk.nss
/*
   Desc
*/
//:: Created By:
//:: Copyright (c) 2002 Bioware Corp.
#include "k_inc_glob_party"
#include "k_oei_hench_inc"

void StopCombat()
{
   object oPC = GetFirstPC();
   CancelCombat(oPC);

   int i;
   object oEnemy;

   for(i = 0;i < 20;i++)
   {
       oEnemy = GetObjectByTag("REThug4", i);
       if(GetIsObjectValid(oEnemy))
       {
           ChangeToStandardFaction( oEnemy,STANDARD_FACTION_NEUTRAL );
           CancelCombat(oEnemy);
       }
       oEnemy = GetObjectByTag("REThug5", i);
       if(GetIsObjectValid(oEnemy))
       {
           ChangeToStandardFaction( oEnemy,STANDARD_FACTION_NEUTRAL );
           CancelCombat(oEnemy);
       }
   }
   //take care of the captain
   oEnemy = GetObjectByTag("RECapt");
   if(GetIsObjectValid(oEnemy))
   {
       ChangeToStandardFaction( oEnemy,STANDARD_FACTION_NEUTRAL );
       CancelCombat(oEnemy);
   }
}

void ClearEnemies()
{
   int i;
   object oEnemy;

   for(i = 0;i < 20;i++)
   {
       oEnemy = GetObjectByTag("REThug4", i);
       if(GetIsObjectValid(oEnemy))
           DestroyObject(oEnemy);

       oEnemy = GetObjectByTag("REThug5", i);
       if(GetIsObjectValid(oEnemy))
           DestroyObject(oEnemy);
   }
   //take care of the captain
   oEnemy = GetObjectByTag("RECapt");
   if(GetIsObjectValid(oEnemy))
           DestroyObject(oEnemy);
}

void DestroyVisas()
{
   object oVisasTemp2 = GetObjectByTag("VisasBed");
   if(GetIsObjectValid(oVisasTemp2))
   {
       DestroyObject(oVisasTemp2, 0.0, TRUE);
   }

   object oVisasTemp = GetObjectByTag("VisasCut");
   if (GetIsObjectValid(oVisasTemp))
   {
       DestroyObject(oVisasTemp, 0.0, TRUE);
   }
}

void DoSpecialReset(object oNPC, string sModuleName)
{
   if(GetNPCConstant(GetTag(oNPC)) == NPC_ATTON)
   {
       AurPostString("Resetting Atton 1",15,19,10.0);
       DoAttonSpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_BAO_DUR)
   {
       DoBaoDurSpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_CANDEROUS)
   {
       DoMandSpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_DISCIPLE)
   {
       DoDiscipleSpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_G0T0)
   {
       DoG0T0SpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_HANDMAIDEN)
   {
       DoHandmaidenSpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_HANHARR)
   {
       DoHanharrSpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_HK_47)
   {
       DoHK47SpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_KREIA)
   {
       DoKreiaSpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_MIRA)
   {
       DoMiraSpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_T3_M4)
   {
       DoT3M4SpawnIn(oNPC, sModuleName);
   }
   else if(GetNPCConstant(GetTag(oNPC)) == NPC_VISAS)
   {
       DoVisasMarrSpawnIn(oNPC, sModuleName);
   }
   else
   {
       AurPostString("ERROR: Invalid PartyMember",15,15,10.0);
   }
}

void DoSpecialPuppetReset(object oNPC, string sModuleName)
{
   if(GetPuppetConstant(GetTag(oNPC)) == PUP_SENSORBALL)
   {
       DoRemoteSpawnIn(oNPC, sModuleName);
   }
}

void ResetEbonHawk()
{
   AurPostString("k_inc_hawk: Resetting Ebon Hawk", 15, 18, 10.0);
   int i;

   string sTag;
   object oNPC;
   for(i = 0; i < 12; i++)
   {
       sTag = GetNPCTag( i );
       oNPC = GetObjectByTag(sTag);
       if(GetIsObjectValid(oNPC))
       {
           object oWP = GetObjectByTag("WP_gspawn_" + sTag);
           if(GetIsObjectValid(oWP))
           {
               AssignCommand(oNPC, ClearAllActions());
               AssignCommand(oNPC, ActionJumpToLocation(GetLocation(oWP)));
               DelayCommand(0.2, DoSpecialReset(oNPC, "003EBO"));
           }
           else
           {
               AurPostString("RESET EBONHAWK: invalid waypoint!", 15,15,10.0);
           }
       }
   }

   object oRemote = GetObjectByTag("remote");
   if(GetIsObjectValid(oRemote))
   {
       object oWP = GetObjectByTag("WP_gspawn_" + sTag);
       if(GetIsObjectValid(oWP))
       {
           AssignCommand(oNPC, ClearAllActions());
           AssignCommand(oNPC, ActionJumpToLocation(GetLocation(oWP)));
           DelayCommand(0.2, DoSpecialPuppetReset(oNPC, "003EBO"));
       }
       else
       {
           AurPostString("RESET EBONHAWK: invalid waypoint!", 15,15,10.0);
       }
   }
   //AWD-OEI 10/29/2004
   DestroyVisas();
}

void TurnOffCutsceneMode(object oNPC)
{
   AssignCommand(oNPC, ClearAllActions());
   //waypoints on
   //AssignCommand(oPartyMember, GN_SetSpawnInCondition(SW_FLAG_WAYPOINT_DEACTIVATE, FALSE));
   //AssignCommand(oPartyMember, GN_WalkWayPoints());

   //waypoints off
   AssignCommand(oNPC, GN_SetSpawnInCondition(SW_FLAG_WAYPOINT_DEACTIVATE, TRUE));
   AssignCommand(oNPC, ActionPlayAnimation(ANIMATION_LOOPING_PAUSE, 1.0, -1.0));//clear animations
}

void ClearEbonHawk()
{
   AurPostString("k_inc_hawk: ClearEbonHawk", 15, 21, 10.0);
   int i;
   int bOnXbox = GetIsXBox();

   string sTag;
   object oNPC;
   for(i = 0; i < 12; i++)
   {
       sTag = GetNPCTag( i );
       oNPC = GetObjectByTag(sTag);
       if(GetIsObjectValid(oNPC))
       {
           //SaveNPCByObject(i , oNPC);
           DestroyObject(oNPC, 0.0, bOnXbox);
       }
   }
   object oRemote = GetObjectByTag("remote");
   if(GetIsObjectValid(oRemote))
   {
       //SavePUPByObject(PUP_SENSORBALL, oRemote);
       DestroyObject(oRemote, 0.0, bOnXbox);
   }
}


void SetBackground()
{
   //string sRoom = GetScriptStringParameter();
   string sRoom = "003EBOq";
   int nRoomAnimation = GetGlobalNumber("003EBO_BACKGROUND");

   switch(nRoomAnimation)
   {
       case 0://106PER
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP01;
       }break;
       case 1://201TEL
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP02;
       }break;
       case 2://262TEL
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP03;
       }break;
       case 3://301NAR
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP04;
       }break;
       case 4://401DXN
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP05;
       }break;
       case 5://601DAN
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP06;
       }break;
       case 6://701KOR
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP07;
       }break;
       case 7://801DRO
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP08;
       }break;
       case 8://space
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP09;
       }break;
       case 9://901MAL
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP10;
       }break;
       case 10://Hyperspace
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP11;
       }break;
       case 11://RhenVar
       {
           nRoomAnimation = ANIMATION_ROOM_SCRIPTLOOP03;
       }break;
       default://error
       {
           AurPostString("EBO ERROR: No background sepcified!",15,15,10.0);
       }
   }
   PlayRoomAnimation(sRoom, nRoomAnimation);
}

void SetHologramWorld()
{
   string sResRef;
   int nCurrentWorld = GetGlobalNumber("003EBO_BACKGROUND");
   switch(nCurrentWorld)
   {
       case 0://106PER
       {
           sResRef = "holo_per";
       }break;
       case 1://201TEL
       {
           sResRef = "holo_tel";
       }break;
       case 2://262TEL
       {
           sResRef = "holo_tel";
       }break;
       case 3://301NAR
       {
           sResRef = "holo_nar";
       }break;
       case 4://401DXN
       {
           sResRef = "holo_dxn";
       }break;
       case 5://601DAN
       {
           sResRef = "holo_dan";
       }break;
       case 6://701KOR
       {
           sResRef = "holo_kor";
       }break;
       case 7://801DRO
       {
           sResRef = "";
       }break;
       case 8://space
       {
           sResRef = "";
       }break;
       case 9://901MAL
       {
           sResRef = "holo_mal";
       }break;
       case 10://Hyperspace
       {
           sResRef = "";
       }break;
       case 11://RhenVar
       {
           sResRef = "holo_mal";
       }break;
       default://error
       {
           AurPostString("EBO ERROR: No background sepcified!",15,15,10.0);
       }
   }
   object oHoloWorld = GetObjectByTag("hologram");
   if(GetIsObjectValid(oHoloWorld))
       DestroyObject(oHoloWorld);
   if(sResRef != "")
   {
       object oNewHoloWorld = CreateObject(OBJECT_TYPE_PLACEABLE, sResRef, GetLocation(GetObjectByTag("WP_hologram")));
       if(GetIsObjectValid(oNewHoloWorld))
       {
           //AssignCommand ( oNewHoloWorld, ActionPlayAnimation(ANIMATION_PLACEABLE_ANIMLOOP01, 1.0, -1.0));
           DelayCommand( 1.0, AssignCommand ( oNewHoloWorld, ActionPlayAnimation(ANIMATION_PLACEABLE_ANIMLOOP01) ) );
       }
   }
}


// GetCurrentPlanet
// returns a planet constant based on background
// will return -1 if not on a planet
void GetCurrentPlanet()
{
   int nRoomAnimation = GetGlobalNumber("003EBO_BACKGROUND");

   switch(nRoomAnimation)
   {
       case 0://106PER
       {
           //return PLANET_PERAGUS;
           return PLANET_EBON_HAWK;
       }break;
       case 1://201TEL
       {
           return 10; // citadel station
       }break;
       case 2://262TEL
       {
           return PLANET_TELOS;
       }break;
       case 3://301NAR
       {
           return PLANET_NAR_SHADDAA;
       }break;
       case 4://401DXN
       {
           return PLANET_DXUN;
       }break;
       case 5://601DAN
       {
           return PLANET_DANTOOINE;
       }break;
       case 6://701KOR
       {
           return PLANET_KORRIBAN;
       }break;
       case 7://801DRO
       {
           return PLANET_M4_78;
       }break;
       case 8://space
       {
           return PLANET_EBON_HAWK;
       }break;
       case 9://901MAL
       {
           return PLANET_MALACHOR_V;
       }break;
       case 10://Hyperspace
       {
           return PLANET_EBON_HAWK;
       }break;
       case 12://RhenVar
       {
           return PLANET_LIVE_02;
       }break;
       default://error
       {
           return PLANET_EBON_HAWK;
       }
   }
   return PLANET_EBON_HAWK;
}

Link to comment
Share on other sites

Okay...I tried re-doing this with a new nwscript, and got the same error. I get no errors for the individual scripts though, just for k_inc_hawk.nss ...

 

Here is the version I'm using:

 

Change...

 

 

void GetCurrentPlanet()

 

...to...

 

int GetCurrentPlanet()

 

...and it will probably work better to compile. :)

Link to comment
Share on other sites

Well...I tried it, but no luck. I get the same error again :(

 

I searched the other scripts, too, but they all use GetCurrentPlanet like this:

 

int nPrevPlanet = GetCurrentPlanet();

 

Well, I used the very include file you posted above, and after changing the return type a script using it compiled without any problems. Thus your problem either likely lies within the script from which you use the include file (post it and I'll have a look) or your compiler is improperly configured somehow.

Link to comment
Share on other sites

It's four scripts, in fact:

 

a_galaxymap.nss:

// ST: a_galaxymap.nss (003EBO_s.rim)

#include "k_inc_hawk"

void main() {
   if (GetGlobalNumber("003EBO_Atton_Talk") <= 4) {
       object oPC = GetFirstPC();
       AssignCommand(oPC, ClearAllActions());
       AssignCommand(OBJECT_SELF, ActionStartConversation(oPC, "galaxy", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE));   
       return;
   }
   else if (GetGlobalNumber("003EBO_RETURN_DEST") == 4) {
       if (GetGlobalNumber("502OND_End_First") == 0) {
           object oPC = GetFirstPC();
           AssignCommand(oPC, ClearAllActions());
           AssignCommand(OBJECT_SELF, ActionStartConversation(oPC, "galaxy2", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE));          
           return;
       }
   }
   else if (GetGlobalNumber("003_IN_COMBAT") == 1) {
       object oPC = GetFirstPC();
       AssignCommand(oPC, ClearAllActions());
       AssignCommand(OBJECT_SELF, ActionStartConversation(oPC, "galaxy", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE));           
       return;
   }

   int nWorld = 0;
   for (nWorld = PLANET_DANTOOINE; nWorld < PLANET_LIVE_01; ++nWorld) {
       SetPlanetAvailable(nWorld, FALSE);
       SetPlanetSelectable(nWorld, FALSE); 
   }

   if (GetGlobalNumber("900MAL_Open") == 1) {
       for (nWorld = PLANET_DANTOOINE; nWorld < PLANET_LIVE_01; nWorld++) {
           int nPlanet = nWorld;
           SetPlanetAvailable(nPlanet, TRUE);

           if (nWorld == PLANET_MALACHOR_V) 
               SetPlanetSelectable(nPlanet, TRUE); 
       }       
   }
   else if (GetGlobalNumber("262TEL_Escape_Telos") == 1) {
       for (nWorld = PLANET_DANTOOINE; nWorld < PLANET_LIVE_01; nWorld++) {
           int nPlanet = nWorld;

           if (nWorld != PLANET_MALACHOR_V) {
               SetPlanetAvailable(nPlanet, TRUE);

               if (nWorld != PLANET_PERAGUS) 
                   SetPlanetSelectable(nPlanet, TRUE);                 
           }
       }

       if (GetGlobalNumber("401DXN_Visited") == 0) {
           SetPlanetAvailable(PLANET_DXUN, FALSE);
           SetPlanetSelectable(PLANET_DXUN, FALSE);    
       }
       else {
           SetPlanetSelectable(PLANET_ONDERON, FALSE);
       }       
   }
   else {
       SetPlanetAvailable(PLANET_HARBINGER, TRUE);
       SetPlanetSelectable(PLANET_HARBINGER, TRUE);    
       SetPlanetAvailable(PLANET_PERAGUS, TRUE);
       SetPlanetSelectable(PLANET_PERAGUS, FALSE);                                 
   }
{

   SetPlanetAvailable(PLANET_TELOS, FALSE);
   SetPlanetSelectable(PLANET_TELOS, FALSE);
   SetPlanetAvailable(PLANET_M4_78, FALSE);
   SetPlanetSelectable(PLANET_M4_78, FALSE);   
   SetPlanetAvailable(PLANET_EBON_HAWK, FALSE);
   SetPlanetSelectable(PLANET_EBON_HAWK, FALSE);
}   

   int nPlanet = GetCurrentPlanet();

   // ST: In Space or Hyperspace
   if ((GetGlobalNumber("003EBO_BACKGROUND") == 8) || (GetGlobalNumber("003EBO_BACKGROUND") == 10)) 
{
       nPlanet = PLANET_EBON_HAWK;
       SetPlanetAvailable(PLANET_EBON_HAWK, TRUE); 
   }
SetPlanetAvailable(PLANET_LIVE_02, TRUE);
SetPlanetSelectable(PLANET_LIVE_02, TRUE);

   SetPlanetSelectable(nPlanet, FALSE);
   ShowGalaxyMap(nPlanet);
}

 

check_party_gui.nss:

// ST: check_party_gui.nss (003EBO_s.rim)

#include "k_inc_hawk"

void ExitEbonHawk() {
   int nDest = GetGlobalNumber("003EBO_RETURN_DEST");
   string sDest;

   switch (nDest) {
       case 0:  sDest = "106PER";      break;
       case 1:  sDest = "201TEL";      break;
       case 2:  sDest = "262TEL";      break;
       case 3:  sDest = "301NAR";      break;
       case 4:  sDest = "401DXN";      break;
       case 5:  sDest = "601DAN";      break;
       case 6:  sDest = "701KOR";      break;
       case 7:  sDest = "801DRO";      break;
       case 8:  sDest = "IN_TRANSIT";  break;
       case 9:  sDest = "901MAL";      break;
       case 10: sDest = "IN_TRANSIT";  break;
       case 11:  sDest = "921RVR";      break;
       default: sDest = "ERROR";
   }

   if (sDest == "ERROR")
       AurPostString("EBO ERROR: No module sepcified!", 5, 15, 10.0);
   else if (sDest == "IN_TRANSIT")
       AurPostString("Flying through space, wooooooooo!", 5, 15, 10.0);
   else
       StartNewModule(sDest, "WP_from_ebonhawk");  
}

void main() {
   SetGlobalFadeIn();
   int nParam = GetRunScriptVar();

   if (!nParam) {
       object oPC = GetFirstPC();

       AssignCommand(oPC, ClearAllActions());
       AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_from_outside"))));   
   }
   else {
       SetGlobalBoolean("003_PARTY_SPAWN", FALSE);
       ExitEbonHawk();
   }
}

 

k_sup_galaxymap.nss:

 

//:: k_sup_galaxymap
/*
   Universal Script that fires when
   the galaxy map is used.
*/

#include "k_inc_hawk"

//turns off all of the core worlds and live planets.
void CUSTOM_TurnOffPlanets();

int CUSTOM_PlanetIDTo2DA(int nPlanetID);
int CUSTOM_2DAToPlanetID(int nPlanet2DA);

void DoFirst301()
{
   NoClicksFor(1.0);
   SetGlobalFadeOut();
   object oPlayer = GetFirstPC();
   object oAtton = GetObjectByTag("atton");
   object oMand = GetObjectByTag("mand");
   object oKreia = GetObjectByTag("kreia");
   object oT3M4 = GetObjectByTag("t3m4");
   object oDisc = GetObjectByTag("disciple");
   object oMaid = GetObjectByTag("handmaiden");

   TurnOffCutsceneMode(oAtton);
   TurnOffCutsceneMode(oMand);
   TurnOffCutsceneMode(oKreia);
   TurnOffCutsceneMode(oT3M4);
   TurnOffCutsceneMode(oDisc);
   TurnOffCutsceneMode(oMaid);

   //AssignCommand(oAtton, ClearAllActions());
   //AssignCommand(oMand, ClearAllActions());
   //AssignCommand(oKreia, ClearAllActions());
   //AssignCommand(oT3M4, ClearAllActions());
   //AssignCommand(oDisc, ClearAllActions());
   //AssignCommand(oMaid, ClearAllActions());

   //AssignCommand(oAtton, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_301_atton"))));
   AssignCommand(oMand, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_301_mand"))));
   AssignCommand(oKreia, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_301_kreia"))));
   AssignCommand(oT3M4, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_301_t3m4"))));
   AssignCommand(oDisc, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_301_disc"))));
   AssignCommand(oMaid, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_301_maid"))));

   SignalEvent(GetArea(oPlayer), EventUserDefined(1));
   AssignCommand(oPlayer, ClearAllActions());
   AssignCommand(oPlayer, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_301_player"))));
}

void DoFirst701()
{
   NoClicksFor(1.0);
   SetGlobalFadeOut();
   object oPlayer = GetFirstPC();
   object oAtton = GetObjectByTag("mand");
   object oVisas = GetObjectByTag("visasmarr");
   object oKreia = GetObjectByTag("kreia");

   TurnOffCutsceneMode(oAtton);
   TurnOffCutsceneMode(oKreia);
   TurnOffCutsceneMode(oVisas);

   //AssignCommand(oAtton, ClearAllActions());
   //AssignCommand(oKreia, ClearAllActions());
   //AssignCommand(oVisas, ClearAllActions());

   //AssignCommand(oAtton, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_301_atton"))));
   AssignCommand(oVisas, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_301_mand"))));
   AssignCommand(oKreia, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_301_kreia"))));

   SignalEvent(GetArea(oPlayer), EventUserDefined(1));
   AssignCommand(oPlayer, ClearAllActions());
   AssignCommand(oPlayer, ActionJumpToLocation(GetLocation(GetObjectByTag("WP_301_player"))));
}


void DoPlanetChange()
{
   if(GetGlobalNumber("401DXN_STARTED") == 1)
   {
       SetGlobalNumber("401DXN_STARTED", 2);
       PlayMovieQueue();
       StartNewModule("003EBO", "WP_PC_WALK_MAP");
   }
   else if(GetModuleName() == "001EBO")
   {
       // if we are in tutorial, the galaxy map has different functionality
       SetGlobalNumber ( "001EBO_Movie_End", 1);
       PlayMovie("permov02");//play tutorial
       AssignCommand( GetObjectByTag("Galaxymap"),ActionStartConversation(GetFirstPC(),"outro") );
   }
   else if( (GetGlobalNumber("003EBO_BACKGROUND") == 3)  && !GetGlobalBoolean("301_FIRST_ENTER") && (GetGlobalNumber("301_INTRO_SCENE") == 0) )
   {// first time to nar shadda
       SetGlobalNumber("003EBO_RETURN_DEST",3);
       SetGlobalNumber("301_INTRO_SCENE", 1);
       DoFirst301();
   }
   else if( (GetGlobalNumber("003EBO_BACKGROUND") == 6) && !GetGlobalBoolean("701_FIRST_ENTER") && (GetGlobalNumber("701_INTRO_SCENE") == 0) )
   {//first time to koriban
       SetGlobalNumber("003EBO_RETURN_DEST",6);
       SetGlobalBoolean("701_FIRST_SCENE", TRUE);
       SetGlobalNumber("701_INTRO_SCENE", 1);
       DoFirst701();

       //old module load way below:
       //PlayMovieQueue();
       //StartNewModule("003EBO", "WP_from_outside");
   }
   //AWD-OEI 10-23-2004
   else if((GetGlobalNumber("003EBO_BACKGROUND") == 1) && (!GetGlobalBoolean("201_FIRST_ENTER")))//201 first time
   {//first time to Telos, go ahead and jump to 201
       PlayMovieQueue();
       StartNewModule("201TEL", "WP_from_ebonhawk");
   }
   // 262TEL cutscene triggers (JAB-OEI 10/22/04)
   else if( (GetGlobalNumber("000_Jedi_Found") >= 1) && (GetGlobalNumber("000_Jedi_Found") < 4) && (GetGlobalNumber("000_Atriscs1") == 0) && (GetGlobalBoolean("000_PLAYER_GENDER")))
   {//only if player is male
       PlayMovieQueue();
       SetGlobalNumber("000_Atriscs1",2);
       StartNewModule("262TEL");
   }
   else if( (GetGlobalNumber("000_Jedi_Found") >= 2) && (GetGlobalNumber("000_Jedi_Found") < 4) && (GetGlobalNumber("000_Siscut1") == 0) && (GetGlobalBoolean("000_PLAYER_GENDER")))
   {//only if player is male
       PlayMovieQueue();
       SetGlobalNumber("000_Siscut1",2);
       StartNewModule("262TEL");
   }
   else
   {
       SignalEvent(GetArea(GetFirstPC()), EventUserDefined(1));
       PlayMovieQueue();
   }
}


void main()
{
   int nSelected = GetSelectedPlanet();
   int nPrevPlanet = GetCurrentPlanet();

   if(nSelected == -1)
       return;


   // queue up leaving movie
   switch(GetGlobalNumber("003EBO_BACKGROUND"))
   {
       case 0://106PER
       {
           // I don't think we have a movie to play here
       }break;
       case 1://201TEL
       {
           QueueMovie("TelMov02");
           QueueMovie("HypMov01");
       }break;
       case 2://262TEL
       {
           QueueMovie("TelMov14");
           QueueMovie("HypMov01");
       }break;
       case 3://301NAR
       {
           QueueMovie("NarMov02");
           QueueMovie("HypMov01");
       }break;
       case 4://401DXN
       {
           QueueMovie("OndMov04");
           QueueMovie("HypMov01");
       }break;
       case 5://601DAN
       {
           QueueMovie("DanMov02");
           QueueMovie("HypMov01");
       }break;
       case 6://701KOR
       {
           QueueMovie("KorMov02");
           QueueMovie("HypMov01");
       }break;
       case 7://801DRO
       {
           QueueMovie("DroMov04");
           QueueMovie("HypMov01");
       }break;
       case 8://space
       {
           QueueMovie("HypMov01");
       }break;
       case 9://901MAL
       {
       }break;
       case 10://Hyperspace
       {
       }break;
case 12: // RhenVar
{
QueueMovie("HypMov01");
}break;

   }

   int nPlanet = nSelected;


   // Do other stuff like play movies, do stuff to Ebon Hawk
   // we need two movies - the planet that we are leaving, and then the dest planet
   // after we get those two string, we can then play the two movies in sequence
   // we are setting two variables on the ebon hawk. One is for the background, and the
   // other is for the exit module.
   switch(nPlanet)
   {
       case PLANET_PERAGUS:
       {
           AurPostString("ERROR: We should not be able to travel back to peragus.",0,10,5.0);
       }break;
       case 10://citadel station
       {
           SetGlobalNumber("003EBO_RETURN_DEST",1);
           SetGlobalNumber("003EBO_BACKGROUND",1);

           // need to check where we are landing
           QueueMovie("TelMov01");
       }break;
       case PLANET_TELOS://polar region
       {
           SetGlobalNumber("003EBO_RETURN_DEST",2);
           SetGlobalNumber("003EBO_BACKGROUND",2);

           // need to check where we are landing
           QueueMovie("TelMov15");
       }break;
       case PLANET_NAR_SHADDAA:
       {
           SetGlobalNumber("003EBO_RETURN_DEST",3);
           SetGlobalNumber("003EBO_BACKGROUND",3);

           if(GetGlobalBoolean("301_FIRST_ENTER"))//only que this movie if we have been here before
               QueueMovie("NarMov01");
       }break;
       case PLANET_DXUN:
       {

           SetGlobalNumber("003EBO_RETURN_DEST",4);
           SetGlobalNumber("003EBO_BACKGROUND",4);

           QueueMovie("OndMov03");
       }break;
       case PLANET_ONDERON:
       {

           SetGlobalNumber("003EBO_RETURN_DEST",4);
           SetGlobalNumber("003EBO_BACKGROUND",4);

           //first time going to onderon?
           if( (GetGlobalNumber("401DXN_Visited") == 0) && (GetGlobalNumber("401DXN_STARTED") == 0) )
           {
               SetGlobalNumber("401DXN_STARTED", 1);
               SetGlobalNumber("003EBO_RETURN_DEST",8);
               SetGlobalNumber("003EBO_BACKGROUND",8);//set space background
               QueueMovie("OndScn01");
           }
           else
               AurPostString("ERROR!!! GALAXY MAP!",5,15,10.0);
       }break;
       case PLANET_DANTOOINE:
       {
           SetGlobalNumber("003EBO_RETURN_DEST",5);
           SetGlobalNumber("003EBO_BACKGROUND",5);

           QueueMovie("DanMov01");
       }break;
       case PLANET_KORRIBAN:
       {
           SetGlobalNumber("003EBO_RETURN_DEST",6);
           SetGlobalNumber("003EBO_BACKGROUND",6);

           QueueMovie("KorMov01");
       }break;
       case PLANET_M4_78:
       {
           SetGlobalNumber("003EBO_RETURN_DEST",7);
           SetGlobalNumber("003EBO_BACKGROUND",7);

           QueueMovie("DroMov02");
       }break;
       case PLANET_MALACHOR_V:
       {
           SetGlobalNumber("003EBO_RETURN_DEST",9);
           SetGlobalNumber("003EBO_BACKGROUND",9);

           QueueMovie("MalMov07");
       }break;
case PLANET_LIVE_02:
{
   SetGlobalNumber("003EBO_RETURN_DEST",12);
   SetGlobalNumber("003EBO_BACKGROUND",12);
}break;     

   }
   //fade out
   SetBackground();
   ExecuteScript("a_holoworld", GetFirstPC());
   DoPlanetChange();
}


//turns off all of the core worlds and live planets.
void CUSTOM_TurnOffPlanets()
{

   SetPlanetSelectable(PLANET_TELOS, FALSE);
   SetPlanetSelectable(PLANET_NAR_SHADDAA, FALSE);
   SetPlanetSelectable(PLANET_DXUN, FALSE);
   SetPlanetSelectable(PLANET_ONDERON, FALSE);
   SetPlanetSelectable(PLANET_DANTOOINE, FALSE);
   SetPlanetSelectable(PLANET_KORRIBAN, FALSE);
   SetPlanetSelectable(PLANET_MALACHOR_V, FALSE);

   if(GetIsLiveContentAvailable(LIVE_CONTENT_PKG1))
   {
       SetPlanetSelectable(PLANET_M4_78, FALSE);
   }
   if(GetIsLiveContentAvailable(LIVE_CONTENT_PKG2))
   {
       SetPlanetSelectable(PLANET_LIVE_01, FALSE);
   }
   if(GetIsLiveContentAvailable(LIVE_CONTENT_PKG3))
   {
       SetPlanetSelectable(PLANET_LIVE_02, FALSE);
   }
   if(GetIsLiveContentAvailable(LIVE_CONTENT_PKG4))
   {
       SetPlanetSelectable(PLANET_LIVE_03, FALSE);
   }
   if(GetIsLiveContentAvailable(LIVE_CONTENT_PKG5))
   {
       SetPlanetSelectable(PLANET_LIVE_04, FALSE);
   }
   if(GetIsLiveContentAvailable(LIVE_CONTENT_PKG6))
   {
       SetPlanetSelectable(PLANET_LIVE_05, FALSE);
   }
}

 

and tr_leave_ehawk.nss:

// ST: tr_leave_ehawk.nss (003EBO_s.rim)

#include "k_inc_hawk"

void ExitToDxunOnderon();
void ExitToKorriban();
void DoEbo004ExitHawk();

void main() {
   object oEnter = GetEnteringObject();

   // ST: Merged tr_leave_ehawk from 003EBO and 004EBO so they both
   //     work if put in Override.
   if (GetTag(GetArea(oEnter)) == "004EBO") {
       DoEbo004ExitHawk();
       return; 
   }

   SetNPCSelectability(NPC_KREIA, TRUE);
   SetNPCSelectability(NPC_ATTON, TRUE);

   if (oEnter == GetFirstPC()) {
       // ST: In combat
       if (GetGlobalNumber("003_IN_COMBAT") == 1) {
           BarkString(OBJECT_INVALID, 135165); 
           return;
       }       
       // ST: In space
       else if (GetGlobalNumber("003EBO_RETURN_DEST") == 8) {
           BarkString(OBJECT_INVALID, 129942); 
           return;         
       }
       // ST: Landed on Dxun
       else if (GetGlobalNumber("003EBO_RETURN_DEST") == 4) {
           SetGlobalFadeOut();
           SetFadeUntilScript();
           AurPostString("Leaving the hawk", 15, 22, 10.0);
           DelayCommand(1.0, ExitToDxunOnderon());
       }   
       // ST: Landed on Korriban       
       else if (GetGlobalNumber("003EBO_RETURN_DEST") == 6) {
           SetGlobalFadeOut();
           SetFadeUntilScript();
           AurPostString("Leaving the hawk", 15, 22, 10.0);
           DelayCommand(1.0, ExitToKorriban());
       }
       else {
           SetGlobalFadeOut();
           SetFadeUntilScript();   
           ShowPartySelectionGUI("check_party_gui", -1, -1, TRUE);     
       }           
   }
}

void ExitToDxunOnderon () {
   if (GetGlobalBoolean("401_FIRST_ENTER") && (GetGlobalNumber("502OND_End_First") > 0)) {
       AurPostString("Atton is selectable", 5, 19, 10.0);
       SetNPCSelectability(NPC_ATTON, TRUE);
   }
   else {
       SetNPCSelectability(NPC_ATTON, FALSE);
       AurPostString("Atton is NOT selectable", 5, 19, 10.0);
   }   
   AurPostString("Showing party selection", 5, 20, 10.0);
   ShowPartySelectionGUI("check_party_gui"); 
}

void ExitToKorriban() {
   SetNPCSelectability(NPC_KREIA, FALSE);
   AurPostString("Kreia is NOT selectable", 5, 19, 10.0);
   AurPostString("Showing party selection", 5, 20, 10.0);
   ShowPartySelectionGUI("check_party_gui");   
}

void DoEbo004ExitHawk() {
   if (GetEnteringObject() == GetFirstPC()) {
       int nDest = GetGlobalNumber("003EBO_RETURN_DEST");
       string sDest;

       switch (nDest) {
           case 0:  sDest = "106PER"; break;
           case 1:  sDest = "201TEL"; break;
           case 2:  sDest = "262TEL"; break;
           case 3:  sDest = "301NAR"; break;
           case 4:  sDest = "401DXN"; break;
           case 5:  sDest = "601DAN"; break;
           case 6:  sDest = "701KOR"; break;
           case 7:  sDest = "801DRO"; break;
           case 8:  sDest = "ERROR";  break;
           case 9:  sDest = "901MAL"; break;
           case 10: sDest = "ERROR";  break;
           case 12:  sDest = "921RVR"; break;
           default: sDest = "ERROR";
       }

       if (sDest == "ERROR")
           AurPostString("EBO ERROR: No module sepcified!", 5, 15, 10.0);
       else
           StartNewModule(sDest, "WP_from_ebonhawk");
   }
}

Link to comment
Share on other sites

It's four scripts, in fact:

a_galaxymap.nss:

check_party_gui.nss:

k_sup_galaxymap.nss:

and tr_leave_ehawk.nss:

 

 

All four scripts compiled without any problems using the include file you posted earlier (with the correction to it I posted about above). Thus the problem seems to lie with your script compiler setup somehow. Have you put the include file in the correct place so the compiler finds it when you try to compile the scripts? Are you using the compiler in TSL-mode (if you use Fred Tetras version of nwnnsscomp)?

Link to comment
Share on other sites

It's in TSL mode, k_inc_hawk is in the same folder as the source files...I'm confused. I've even tried different versions of KT to no effect...

 

Hmm, perhaps Kotortool does not use your modified include file and instead pulls it from the BIF data? I don't use KotorTool to compile scripts so I'm not sure how it works.

 

Try putting some text that isn't valid script code at the very top of your k_inc_hawk and try to recompile one of your scripts. If the compiler does not report your deliberate error then it uses the wrong include file.

 

(Gah, not again. :( The Reply and Edit links really are too close to each other...)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...