Aller au contenu

Photo

Move script with waypoints - not quite working


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

#1
Sonmeister

Sonmeister
  • Members
  • 167 messages
I'm trying to have my quest giver walk to the entrance of some ruins to show the PC.  He walks to the first wp but then stops.  Any ideas?  Is the format correct?

/*
Type: Script triggered in a conversation.
Owner: Sonny
Desc: Makes Thorag move to entrance of ruin
*/

#include "utility_h"

#include "plt_gathering_items"


const string THORAG_QG  =  "my_ruins_quest_giver";

    object oPC = GetHero();

void main()
{
      object oThorag = UT_GetNearestCreatureByTag(oPC, "my_ruins_quest_giver");

      WR_ClearAllCommands(oThorag);
      location [] wpthorag;

      wpthorag[0] = GetLocation(UT_GetNearestObjectByTag(oPC, "my_ruins_arch_1"));
      wpthorag[1] = GetLocation(UT_GetNearestObjectByTag(oPC, "my_ruins_arch_2"));
      wpthorag[2] = GetLocation(UT_GetNearestObjectByTag(oPC, "my_ruins_arch_3"));
      wpthorag[3] = GetLocation(UT_GetNearestObjectByTag(oPC, "my_ruins_arch_4"));
      wpthorag[4] = GetLocation(UT_GetNearestObjectByTag(oPC, "my_ruins_arch_5"));
      wpthorag[5] = GetLocation(UT_GetNearestObjectByTag(oPC, "my_ruins_arch_6"));

      command ThoragMove = CommandMoveToMultiLocations(wpthorag, TRUE, 0, FALSE);
      AddCommand(oThorag, ThoragMove, TRUE, FALSE);
}

#2
_L_o_B_o_

_L_o_B_o_
  • Members
  • 117 messages
That's strange. I have tested your code and it is running correctly. My test creature ran from "my_ruins_arch_1" to "my_ruins_arch_6".

Maybe the problem is with the location of those waypoints in the area. Have you tried a different distribution of waypoints? Are their tags the same of the script?

Modifié par _L_o_B_o_, 19 juin 2010 - 07:41 .


#3
Sonmeister

Sonmeister
  • Members
  • 167 messages
Yeah, I've tried different distribution and the tags are correct. The area in questions seems to give me lots of difficulties. I'll run some more tests.

#4
TimelordDC

TimelordDC
  • Members
  • 923 messages
Are there lot of creatures with ambient behaviour enabled? Does this NPC have ambient behaviour enabled? If so, can you try disabling that and trying?



Have you checked the walkmesh to make sure that the NPC can walk to those waypoints? Also, have you tried placing the waypoints closer together (in case they are too far from each other)?

#5
Sonmeister

Sonmeister
  • Members
  • 167 messages
The closer putting the wp's together helped. Then the NPC is supposed to walk up on some ruins and he is still getting hung up. I'm still experimenting. I need to check the walkmesh idea out.