Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: sloppy on Mon 10/04/2006 00:02:51

Title: character transfer to another part of screen (SOLVED)
Post by: sloppy on Mon 10/04/2006 00:02:51
All I want to do is have the character go in a door on the screen and come out another door on the other side of the same background.
Title: Re: character transfer to another part of screen
Post by: Ashen on Mon 10/04/2006 01:59:58
So what's the problem?
You can use player.ChangeRoom(...) to change the character's location without actually changing room, or you can just directly alter their x and y properties. Or you might find you get a better effect moving the character to room -1 (player.ChangeRoom(-1)) then bringing them back at the new coordinates (with any animations - dorrs opening/closing etc - you want).
Title: Re: character transfer to another part of screen
Post by: sloppy on Mon 10/04/2006 03:07:11
Okay, but when I do a change room, I get a fade in and out.  Is there a way to eliminate the fade?
Title: Re: character transfer to another part of screen
Post by: Gilbert on Mon 10/04/2006 03:10:57
It won't do that if that character is not the player. However, as Ashen mentioned, you may just adjust the character's x and y properties instead:
player.StopMoving();
player.x = 100;
player.y = 70;
Title: Re: character transfer to another part of screen
Post by: sloppy on Mon 10/04/2006 03:21:16
I wasn't aware of that command.  Thanks, it worked.
Title: Re: character transfer to another part of screen (SOLVED)
Post by: Ashen on Mon 10/04/2006 12:10:13
You could also use SetNextScreenTransition(..) (http://www.adventuregamestudio.co.uk/manual/SetNextScreenTransition.htm) and temporarily change the style to eTransitionInstant, to remove the fade.