Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: rich on Tue 12/08/2008 20:15:57

Title: Easier way to make Ego temporarilly invisible.
Post by: rich on Tue 12/08/2008 20:15:57
I would like to know if there is a good way to make Ego temporarilly invisible. This is useful during cutscenes or some such thing when I have close-ups. I need to have Ego in the room in order for the game to move there, I just don't want him to appear on the screen.

I have so far been setting his x value to something like 350 which is offscreen so he won't show up, but this is a little annoying as I then have to keep track of where he was and put him back when the seen is over. Sadly, the Ego character has no visible property or I would've just set that to false temporarilly.

Anyone know of a better way?
Title: Re: Easier way to make Ego temporarilly invisible.
Post by: DoorKnobHandle on Tue 12/08/2008 20:18:07

cEgo.Transparency = 100;
Title: Re: Easier way to make Ego temporarilly invisible.
Post by: rich on Tue 12/08/2008 20:38:03
Yep, yep.. that'll do it! Seems so simple now, I wish I had thought of it.

Thanks a bunch!
Title: Re: Easier way to make Ego temporarilly invisible.
Post by: Pumaman on Tue 12/08/2008 20:41:28
Also, in the editor Rooms have a "Show player character" setting which you can set to False to hide him in close-ups, for example.
Title: Re: Easier way to make Ego temporarilly invisible.
Post by: Shane 'ProgZmax' Stevens on Wed 13/08/2008 05:57:05
Though I make rather extensive use of the .Transparency variable, I wonder if a .Visible flag might not be a good idea for switching on/off the visibility of characters?  Objects and GUI's have it, after all.

What I'd really like to see, though, is a unified property set for characters and objects (ideally, I think objects and characters should just be a single ENTITY type that can be used for characters OR for objects, and I think it would be much easier to deal with both from an engine developer standpoint and an end-user standpoint).  Obviously this isn't the ideal place to post this suggestion, but it's something I've been thinking about for quite some time.  People have been requesting extended functionality for objects for ages, especially the ability for them to change rooms, so some kind of unified class that would allow you to generate characters or objects (with all the strengths of both) would be a long awaited and much appreciated improvement to the overall design.  Just imagining the ability to easily shift objects between rooms with changeroom and the ability to see characters visually in a room alongside objects is something I've been thinking about for awhile, and it's something I think would be a great improvement to the already impressive design.