Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: The Subliminal Messenger on Mon 16/02/2004 18:57:53

Title: Hide Player Character (off)
Post by: The Subliminal Messenger on Mon 16/02/2004 18:57:53
Is there any way to turn "Hide Player Character" off in a room, during the game?

Thanks.
Title: Re:Hide Player Character (off)
Post by: Scummbuddy on Mon 16/02/2004 19:08:10
in the editor, go to the room editor selection tier on the left. then go pick the room you want to edit. once youve done that, you have the 3 tiers below room editor: settings, areas, objects.  click on the settings tier.  then over in the right window, there are a couple (probably 3) checkboxes under the open and save buttons. the third one down is the "hide player character" in current room check box.
Title: Re:Hide Player Character (off)
Post by: The Subliminal Messenger on Mon 16/02/2004 19:17:56
No, I meant, if I tick the box in the editor but I want the option to become unselected at some point in the game, can I do this in the script?
Title: Re:Hide Player Character (off)
Post by: Squinky on Mon 16/02/2004 19:22:25
You might try

character[EGO].room=x;

x being your current room, don't know if this would work though....
Title: Re:Hide Player Character (off)
Post by: Gilbert on Tue 17/02/2004 01:47:39
Quote from: The Subliminal Messenger on Mon 16/02/2004 19:17:56
No, I meant, if I tick the box in the editor but I want the option to become unselected at some point in the game, can I do this in the script?

If your character never appears in that one room, just do as Scummbuddy mentioned, otherwise, try this "undocumented" method:

character[EGO].on=0;

not gauranteed to work.
Title: Re:Hide Player Character (off)
Post by: Phemar on Tue 17/02/2004 18:10:48
I say create a sprite that's totally invisible and create it into a view. Under Player Enters screen (before fadein)
SetCharacterView (EGO, x);

x being the view number. Then when you want him to reappear, use

ReleaseCharacterView (EGO);

This will restore the charcaters view to it's default.

Hope it helps!

.:Zor:.
Title: Re:Hide Player Character (off)
Post by: Kweepa on Tue 17/02/2004 18:16:13
How about don't tick the box, but use
character[EGO].x = -100;
at the start of the room, and
character[EGO].x = some onscreen value;
when you want EGO to appear?
Title: Re: Hide Player Character (off)
Post by: nims on Wed 08/04/2015 23:14:17
Hi,

This is an old topic, but I have found that using the following also works:
Code (ags) Select

  player.Transparency=100;


Making it visible can then be done via:
Code (ags) Select

  player.Transparency=0;

I am using this for a player to get into a car, and it then makes the car move.