After a non-player character exchanges dialog with the player, I want him to leave the room. Please could someone tell me the script needed and where it needs to be posted?
Hi
Simply add this to your Room script after the talking:
cEgo.ChangeRoom(30,100,240);
Change cEgo to the NPC name. Move him to Room 30 at 100x and 240y coordinates or wherever room and coordinates you want..
If you are using a Dialog Option then you must indent the text after the Option that applies(that is a space before adding above script)
-barefoot-
Placing this in the room script won't work since a dialog isn't run until the very end of a function and therefore the NPC will leave the room before the dialog starts.
But, as barefoot mentions, you can use standard scripting inside dialog scripts if you put a blank space before the command.