End of dialog Move Main character to new room at set coordiates starts early

Started by irafreak, Fri 14/05/2010 18:50:10

Previous topic - Next topic

irafreak

I searched but not sure how this one would be categorized.  Looked in bugs as it may be an issue.

I have a dialog that runs and at the end of the dialog it sends the main character to a new room at set coordinates...it works fine...the problem is that it sets the character to the coordinates first...meaning the dialog begins and the character moves to the coordinates in the current room through the whole dialog....then moves to a new room when the dialog ends.

I changed the command to be move character to new room without the coordinates and no problem. So why does the coordinates command activate early?  There is no scripting on my part involved with this just the option drop down boxes. 

barefoot

You should include the Dialog so we can check it out..

I've used this and it works:

Code: ags

// Dialog script file
@S  // Dialog startup entry point
cDmg: Which is the world's largest ocean?
return
@1
cRedpants: Atlantic
cDmg: Wrong. You are on your own! Pass by
  player.ChangeRoom(28,300,106);
stop
@2
cRedpants: Indian
cDmg: Wrong. You are on your own! Pass by
 player.ChangeRoom(28,300,106);
stop
@3
cRedpants: Pacific
cDmg: Correct. My next question is
 goto-dialog10



barefoot
I May Not Be Perfect but I Have A Big Heart ..

Calin Leafshade

Yea dialogs works by flagging the dialog to run at the end of the current function.

so script commands you want to run after a dialog must be done *inside* the dialog script.

Script commands can be put into dialog by prefixing them with a space or tab.

irafreak

I tried adding it into the dialog but i continue to get errors.  I'm using version 2.72 by the way.  I put in the space after the stop command but it give me the error.

I try to use           cEgo.ChangeRoom(7, 58,121)
but all i get is unknown command cEgo       

irafreak

No dice.  I add that code for the character move with the space but it still doesn't recognize the command in the dialog.  I'm searching now to find what works. 

ThreeOhFour

2.72 doesn't support these types of functions inside your dialogs.

Either upgrade to the latest version, or get used to using run-script x and function dialog_request() - you'll have to put any non-dialog specific code in using this if you want to stick with 2.72


SMF spam blocked by CleanTalk