Pavlos Posted March 3, 2006 Share Posted March 3, 2006 *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 More sharing options...
Darth333 Posted March 4, 2006 Share Posted March 4, 2006 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 More sharing options...
stoffe Posted March 4, 2006 Share Posted March 4, 2006 Also make sure that the text you put in the GetObjectByTag() calls is actually the Tag of the objects, and not the ResRef. Though it is preferable to keep them identical (IMHO), this is not always the case. Link to comment Share on other sites More sharing options...
Pavlos Posted March 4, 2006 Author Share Posted March 4, 2006 @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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.