PDA

View Full Version : Script/Dialog Problem


Ferc Kast
07-01-2008, 03:36 PM
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(lDestinatio n,bRun));
}

Any help would be much appreciated.

Tupac Amaru
07-01-2008, 03:48 PM
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));
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC,ActionMoveToLocation(lDestinatio n,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.