Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Quintaros on Wed 15/11/2006 13:59:41

Title: Is player hidden?
Post by: Quintaros on Wed 15/11/2006 13:59:41
Is there a variable which can be called in a script to determine if a room is using the "Hide Player Character" feature?

I spent almost an hour searching the manual but eventually resorted to a work around with a custom room property.Ã,  If such a feature does not exist, I suggest it would be a useful addition.
Title: Re: Is player hidden?
Post by: Ashen on Wed 15/11/2006 14:08:49
The Character.on property should do that. It's not documented in the manual, but it's definately been mentioned on the forums before - try a search for 'Hide Player Character' or 'making characters invisible' - and it's mentioned in the Tidbit's and Snippets (http://americangirlscouts.org/agswiki/index.php/AGS_tidbits_%26_snippets) Wiki article.
It's not actually limited to rooms with 'Hide Player Character' checked, as you can make the player invisible at any time using player.on = false;, but maybe it's of some use? I.e.:

if (player.on == false) {
  // Do stuff
}


If not, a Custom Property might be the best way.
Title: Re: Is player hidden?
Post by: Quintaros on Wed 15/11/2006 14:38:01
Perfect...thank you.