Hi I'm getting along really well with AGS, was hoping I wouldn't have to learn much scripting or ask too many questions. I got caught on a snag though.
I am trying to have character view an item (ipod) which brings it to a room with the functional ipod interface.
What I need to know since you can use the Ipod in any room, how can I set it to return to the room that the item was viewed from? I couldnt find this in the knowledge base but it seems a basic enough task.
you should try the manual, but anyway:
you will need a global variable to save the number of the room where the ipod was, then you use the ChangeRoom function with your character, and the value of the room will be the global variable
To be specific:
In the iPod's player enters screen (before fadein):
SetGlobalInt(1, player.PreviousRoom);
In the "exit iPod" interaction:
player.ChangeRoom(GetGlobalInt(1));
Yes, you can do it in that way ;)
works for me, try it
why not make it a gui ?
Thanks you guys thats exactly what I needed.
I haven't focused on custom gui's or NPC's yet but hopefully before the weeks over I'll have all the basics covered. I keep getting carried away in things like interactive tv, or this ipod. Its pretty addictive stuff. I just seem to be dyslexic when it comes to scripting so most of what I'm learning is through the default template.
Quote from: KhrisMUC on Wed 07/06/2006 01:09:16
To be specific:
In the iPod's player enters screen (before fadein):
SetGlobalInt(1, player.PreviousRoom);
In the "exit iPod" interaction:
player.ChangeRoom(GetGlobalInt(1));
or even just:
In the "exit iPod" interaction:
player.ChangeRoom(player.PreviousRoom);