You need to make sure you're calling it at the right time. From your original post, it looks like you want it to run as soon as you enter a room. For that to happen you need to put the code inside the room_Enter() function.
To make it work though, you'll need to make room_Enter() occur when your character enters the room. That info should be in the Tutorial (I can't give you anything more exact. I don't have AGS on this computer). Once that is done, the only thing left to do is make sure that the code is doing what you want it to do.
To make it work though, you'll need to make room_Enter() occur when your character enters the room. That info should be in the Tutorial (I can't give you anything more exact. I don't have AGS on this computer). Once that is done, the only thing left to do is make sure that the code is doing what you want it to do.
