Author Topic: Teleporting NPCs  (Read 585 times)

Legacy_uberdowzen

  • Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Teleporting NPCs
« Reply #15 on: November 15, 2010, 08:36:09 am »


               OK, I did some playtesting/investigating and I think the issue I'm having may have arisen out of some convoluted circumstances.



Firstly I was spawning new creatures, but because the variable that keeps track of the quest was stored on the original NPC, that didn't work.



When I changed it to jump, I don't think I tested the conversation with both NPCs to make sure it was working properly, e.g. I tried it with the one who doesn't store the variable. I'm going to have to do some testing but I think I may have fixed it.
               
               

               
            

Legacy_uberdowzen

  • Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Teleporting NPCs
« Reply #16 on: November 16, 2010, 06:12:21 am »


               OK, I have no idea why, but it started working without me doing anything. I possibly didn't save before I loaded the game to test it. Weird.
               
               

               
            

Legacy_Ulo Ironbeard

  • Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Teleporting NPCs
« Reply #17 on: December 03, 2010, 04:50:26 pm »


               Certain NPC's spawn into random areas in my mod, and they have a conversation unique to whatever area they spawn in. I use the UserDefined event of the NPC to fire the correct conversations - maybe this will give you some ideas for setting up your convos:


void main()
{
    int nEvent = GetUserDefinedEventNumber();
    if (nEvent == 1004)

    {
    object oPC = GetPCSpeaker();
    object oYastiang = OBJECT_SELF;
    object oArea;
    oArea = GetArea(oYastiang);
    string sArea = GetTag(oArea);


    if (sArea == "S_raunchyrodent")
    {
    ActionStartConversation(oPC, "con_yastiang");
    }
    else if (sArea == "S_forest_lodge")
    {
    ActionStartConversation(oPC, "con_yastiang2");
    }
    else if (sArea == "S_sleepydragonpub")
    {
    ActionStartConversation(oPC, "con_yastiang3");
    }
    else if (sArea == "S_trneareastroad")
    {
    ActionStartConversation(oPC, "con_yastiang4");
    }
    else if (sArea == "S_sunset_1")
    {
    ActionStartConversation(oPC, "con_yastiang5");
    }
   }
  }

               
               

               


                     Modifié par Ulo Ironbeard, 03 décembre 2010 - 04:52 .