Character room/hiding

Started by TheSaint, Sun 23/07/2006 23:14:42

Previous topic - Next topic

TheSaint

Hello,

Its been a while since the last time i was coding a game in AGS so i will probably have a couple more questions but currently i have a problem with this:

I need to hide character after interacting with it. One way to do it is SetCharacterTransparency, is there another way?

And also i have a problem with room "playing character" hiding - namely i cant find the way to make it appear again and i cant find it in manual (i browsed briefly thru AGS script reference, but havent found it so if anyone knows how to do it please tell me now, and ill lookup in forums history when i get to stable internet connection) - why am i doing it at all? Because transparency seems to work only after fadein and i need character to appear in room after the even - sort of cutscene/intro.

cheers,
TheSaint

P.S. i noticed another similiar post to mine but its not regarding same problem since i already know how to use transparency.

Akumayo

Quote from: TheSaint on Sun 23/07/2006 23:14:42
I need to hide character after interacting with it. One way to do it is SetCharacterTransparency, is there another way?
You could try moving the character to a new room.

Quote from: TheSaint on Sun 23/07/2006 23:14:42
And also i have a problem with room "playing character" hiding - namely i cant find the way to make it appear again
I believe I read how to do this in the tidbits and snippits section.  When you tick 'Hide Player Character', the variable Character.On is changed to 'false'.  I believe.
So, to make the player visible after ticking 'Hide Player Character', you'd just do this:
Code: ags

character[player.ID].On = true;


Once again, I think that's what I read, I'm not positive.  Try it out.
"Power is not a means - it is an end."

TheSaint

thnx for prompt reply

moving character to other room (like -1) doesnt help coz in one case i have to have it with me all the time so it can talk to me altho not visible. i guess this can be solved with transparency setting.

regarding the room setting : ill try it, thnx

btw i found out that transparency can help in this case aswell if u cunningly turn in on in "before fade in" and then turn it off after script finishes in "after fade in". but im really curious whether this will solve room setting.

cheers,
TheSaint

TheSaint

Quote from: "Acqua" Akumayo
So, to make the player visible after ticking 'Hide Player Character', you'd just do this:

Code: ags

character[player.ID].On = true;


I tried that as solution but it gives an error saying 'On' is not a member of 'GameCharacter'

Khris

Try on

btw, character[player.ID] is the same as player, so the actual line should be:
player.on=1;

Play_Pretend

Or you could just create a new View for your character that has only one completely blank frame in it.  When you get to the spot where you need them to hide, just set the character's view to that number, and their speech view as well.  That way they can talk, the words will appear, but they'll look hidden.

SMF spam blocked by CleanTalk