Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: jwalt on Tue 24/01/2017 17:39:53

Title: Moving characters between rooms [answered]
Post by: jwalt on Tue 24/01/2017 17:39:53
I've been working on Spoons III, and I keep having issues with moving characters between differnt rooms as needed. I've had scale issues and transparency issues, because they were scaled differently or left transparent in whatever room they last occupied. I hate to start setting a bunch of stuff, on room load, for each character "just in case." But, that might save time in the long run by cutting back on time spent debugging. Is there any "best practice" for handling character movement between rooms?
Title: Re: Moving characters between rooms
Post by: Danvzare on Tue 24/01/2017 17:45:47
You need to make sure they are on a walkable area in the new room you moved them to. That should set up the scaling and transparency correctly.
Title: Re: Moving characters between rooms
Post by: Cassiebsg on Tue 24/01/2017 17:58:21
Why were they transparent before? Is there an invisible man in the game? I think I missed him. (laugh)
Title: Re: Moving characters between rooms
Post by: dayowlron on Tue 24/01/2017 20:29:50
If you are asking for "best practice" then I would create a function in the global script called something like "ResetCharacters" that would set any setting that the game could change on any character back to a default setting Then in each room in the Load event just call that function. This will save you time in changing every rooms load just because some new character you set the scaling or transparency or whatever setting to something different.
Title: Re: Moving characters between rooms
Post by: jwalt on Tue 24/01/2017 23:44:45
@Danvzare - You might be correct about the walkable area and the scaling. I'm pretty sure that one of the characters I had a problem with was not on a walkable area. She didn't need to move, so it seemed logical, but a walkpath might have scaled her properly. Not sure that transparency issues are affected by walkable areas? Have to look into that.

@Cassiebsg - You may not have seen the invisible man, but, until I fixed it, one of my betas had an incredible shrinking man -- kept getting smaller and smaller with each iteration.

@dayowiron - Good suggestion. May be overkill, but would Would certainly cut back on some of the time I'm spending trying to figure out why someone went wonky.

Thanks, folks!
Title: Re: Moving characters between rooms
Post by: Snarky on Wed 25/01/2017 01:09:42
I don't see any reason why character transparency should change when the character changes room, so if they were transparent in the room they were in and are brought to the present room, that part of it is expected behavior. If you wan to reset it, you'll have to do so explicitly.