Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: essaywrite7 on Fri 16/07/2021 21:53:27

Title: New Room problems
Post by: essaywrite7 on Fri 16/07/2021 21:53:27
I am using the change room code to switch rooms. Room 1 works fine:

cEgo.ChangeRoom(2);

And this gets me to the 2nd room, and the character loads into
the room and the room background is correct, but it won’t
display the text i.e., Dispaly(“hello xyz…”);  and it won’t
run the animations or anything. But the character can walk
around the room. It just won’t run any of the script for room 2

Your input is greatly appreciated
Title: Re: New Room problems
Post by: Crimson Wizard on Fri 16/07/2021 21:55:15
How is the room 2 script is organized, what functions are there, and so on? Have you connected these functions to events in the room editor?
Title: Re: New Room problems
Post by: essaywrite7 on Fri 16/07/2021 22:18:54
I started the second room with

    function room_FirstLoad()
     {

Because it’s the first time I am loading that room. But I also tried

    function room_Load();

And also

   function room_AfterFadeIn();

I tried each of these at a time and then I just tried to display a message and even that won’t work

Display(“message 123…”);

Thank you for your help
Title: Re: New Room problems
Post by: Crimson Wizard on Fri 16/07/2021 23:20:48
So, have you connected these functions to room events in the editor, or simply wrote in script?

Here's the related video tutorial: video (https://www.youtube.com/watch?v=_lghOGrET2A&list=PL21DB402CB4DAEAEF&t=176s)