Quantcast
Channel: LucasForums - Holowan Laboratories
Viewing all articles
Browse latest Browse all 507

Script not working when in dialog

$
0
0
Code:


void main() {



object oNPC1=GetFirstPC();
AssignCommand (oNPC1,ClearAllActions());
float x1=141.6;
float y1=-181.4;
float z=0.0;                       

int bRun=FALSE;

vector vExit1=Vector(x1,y1,z);

location lExit1=Location(vExit1,0.0f);

ActionDoCommand(SetCommandable(TRUE,oNPC1));

AssignCommand (oNPC1,ActionForceMoveToLocation(lExit1,bRun));

AssignCommand(oNPC1, SetFacingPoint(GetPosition(GetObjectByTag("n_shol"))));


        SendMessageToPC(GetFirstPC(),"I Fired1");
}

So I have this script and when fired, it works perfectly. I fired it from a door's onOpen field. Now, i put this script in a dialog. The dialog is now triggered from this door's onOpen field. The script does fire in this dialog, but no longer does the player walk forward as intended. Nothing happens. The player was in the same exact locations both times. Any suggestions?

Viewing all articles
Browse latest Browse all 507

Trending Articles