Jump to content

Home

Script/Dialog Problem


Ferc Kast

Recommended Posts

I've tried to get the following script to work with new dialog file. However, the PC does not move at all. Also, I can't figure out how to make the dialog not start until the script runs.

 

void main() {
   int bRun=FALSE;
   float x=32.88;
   float y=50.34;
   float z=0.00;
   vector vDesk=Vector(x,y,z);
   location lDestination=Location(vDesk,0.0f);
   object oPC = GetFirstPC();
   ActionDoCommand(SetCommandable(TRUE,oPC));
   AssignCommand(oPC,ActionMoveToLocation(lDestination,bRun));
}

 

Any help would be much appreciated.

Link to comment
Share on other sites

Add a ClearAllActions() before the move command. If that doesn't work either, try the ActionForceMoveToLocation() command instead of just ActionMoveToLocation. Also make sure the path isn't blocked by anything or the PC isn't busy doing something else.

 

void main() {
   int bRun=FALSE;
   float x=32.88;
   float y=50.34;
   float z=0.00;
   vector vDesk=Vector(x,y,z);
   location lDestination=Location(vDesk,0.0f);
   object oPC = GetFirstPC();
   ActionDoCommand(SetCommandable(TRUE,oPC));
   [b]AssignCommand(oPC, ClearAllActions());[/b]
   AssignCommand(oPC,ActionMoveToLocation(lDestination,bRun));
}

 

Also, I can't figure out how to make the dialog not start until the script runs.
Make an empty entry node before the talking starts, add a sufficient delay and run the movement script on that node.
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...