Object action order issue.

Started by Sirpunchula, Sat 17/10/2009 21:21:08

Previous topic - Next topic

Sirpunchula

I'm trying to display a line of text in the display box, followed by an action(removing the object), then the character walking to a point, using this code:

Code: ags
function object_Interact()
{
cEgo.Walk(x, y);

  Display("Display text");
  Display("Display text");
  object.Visible = false;
  newobject.Visible = true;
}


My problem is that my character waits until the display text has finished before walking to the point instead of walking there beforehand. Is there a special command I have to enter to change the order?
Pardon my deadpan.

Crimson Wizard

#1
cEgo.Walk(x, y, eBlock);


And... I don't mean any offense, but you seem to ignore manual. If you searched for Walk function, you could read:
Quote
Character.Walk(int x, int y, optional BlockingStyle,
                             optional WalkWhere);

Starts the character moving from its current location to (X,Y), whilst playing his walking animation.

If blocking is eNoBlock (the default) then control returns to the script immediately, and the character will move in the background.

If blocking is eBlock then this command will wait for the character to finish moving before your script resumes.

SMF spam blocked by CleanTalk