Player Character doesn't change room, but other characters do

Started by humaldo, Tue 09/12/2014 23:49:24

Previous topic - Next topic

Monsieur OUXX

Using CallRoomScript is a completely different way of scripting, that almost nobody uses in the AGS community. It's not only about the function itself, but about "moving all my dialog-related scripts to my room script instead of either calling a function that would be in the global script, or putting the instructions directly inside the dialog".

The fact that on_call gets executed at next game loop makes CallRoomScript tricky to use. It's even more tricky here, inside a dialog, since all instructions after dSomething.Start() get executed first, and dSomething.Start is kept for the end.

If you want everything to happen in the same game loop, in the order in which you typed the instructions (to avoid a headache), then you shoud use Khris' trick: use a global boolean that tells you room script to call every instruction that should come after the dialog, as some sort of follow-up function.

I really must write that wiki article about execution order.

 

SMF spam blocked by CleanTalk