Jump to content

Home

[K1] Moving to a waypoint


Pavlos

Recommended Posts

*Sigh*

 

I made a simple script to get two of my NPCs to walk down the corridor while talking.

 

void main()
{

object oWP1 = GetWaypointByTag("wp_sithcmdr");
object oWP2 = GetWaypointByTag("wp_sithsold");
object oCmd = GetObjectByTag("n_sithcmd");
object oSold = GetObjectByTag("c_sith1");

AssignCommand(oCmd, ActionMoveToObject(oWP1));
AssignCommand(oSold, ActionMoveToObject(oWP2));

}

 

It is attached to the "Script that fires when spoken" field of the first dialogue node I have in my .dlg. The odd thing is that this doesn't seem to fire the script - unless something that has escaped my notice is stopping the script itself from working. The dialogue will run and the two will chat but they will remain in the same place - rather than walking to their correct waypoints.

 

I cannot think of what I could have done wrong here. Hopefully it's another one of my impossibly stupid mistakes.

Link to comment
Share on other sites

Try:

void main()
{
object oWP1 = GetWaypointByTag("wp_sithcmdr");
object oWP2 = GetWaypointByTag("wp_sithsold");
object oCmd = GetObjectByTag("n_sithcmd");
object oSold = GetObjectByTag("c_sith1");

AssignCommand(oCmd, ActionMoveToLocation(GetLocation(oWP1),FALSE));
AssignCommand(oSold, ActionMoveToLocation(GetLocation(oWP2),FALSE));
}

Link to comment
Share on other sites

@Darth333: That didn't work either. Does the fact that my dialogue is started from an OnEnter script in the .are - wouldn't think so considering that I've used a script similar to my original before and it worked (under the same circumstances too). I wonder why it doesn't work. Is it actually possible in KotOR without the ActionPauseConversation() command - which wouldn't produce the desired effect.

 

@Stoffe: I always have my tags and resrefs at the same - it just makes organising much easier.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...