character[CHARID].visible
Didn't find it from global variables! No such thing?
Or I just searched badly?
It can be done by changing character's view for a empty frame, but such variable could do things alot easier. Especially needed when character is inside something - so he's not visible and just his speech w/color is needed (such as in a car, starship, house, behind a locked door, etc)
You can do a character[CHARID].room = -1 to make him dissapear, I believe. It's not exactly the same thing though...
Doesn't work if you want him to wander around the current room as an invisible guy.
SetCharacterTrasnparency, but I have some not so good memories of trying it once...
Setting the room to -1 may cause problem if the character in question is the current player character.
SetCharacterTransparency() won't work for 256 colour games.
Using a view with transparent sprite is the way to go.
Anyway, I think a Hide(Show)Character(0 functions can be good for more readible scriptings, better management of views and the like (Using an ordinary variable may require the engine to check it every game loop, which may not be really practical), as there are Hide(Show)MouseCursor() functions already (though I understand that for cursors it may use some of the mouse driver functions, making their implementation without any pain), unless there're so many troubles with it.
Right. But I usually need invisible guy to TALK and this means already messing up 2 Views. And after invisible stuff I must change them back... oh god.
if you move a character to room -1 you can still have him talk and it talks from whatever coordinate he was last in
Yeah right, but may not be good if it's the player character. It's completely okay for nonplayer characters.
AFAIK, the player character can be in diffrent room then the game is, as long as no MoveCharacter or similiar functions are run.
There is an undocumented character[CHARID].on variable, which is normally 1, but you can set it to 0 to make the character invisible.
It's not officially supported though and I'm not sure if it still works properly, but it might do what you need.
My (dirty) solution:
In the time, the player is supposed to be invisible, just change the player's view to a view with transparent sprites only!
Simple, dirty hack, but working - SO WhAT!
Quote from: Pumaman on Tue 21/10/2003 20:39:21
There is an undocumented character[CHARID].on variable, which is normally 1, but you can set it to 0 to make the character invisible.
It's not officially supported though and I'm not sure if it still works properly, but it might do what you need.
hehe, let me go to check AGS plugin interface header to find more undocumented variables... ;D
QuoteIt can be done by changing character's view for a empty frame, but such variable could do things alot easier.
QuoteIn the time, the player is supposed to be invisible, just change the player's view to a view with transparent sprites only!
Don't these mean the same, or am I going insane?
IT IS the same. Mamarulez just didn't read this thread before posting.
I forgot to add a ;D:P in that post.....
And why won't SetCharacterTransparency() work exactly?
Quote from: terranRICH on Wed 22/10/2003 21:36:17
And why won't SetCharacterTransparency() work exactly?
not for 256-color game
EDIT: just checked. seems like it works for 100%ttransparency level:
SetCharacterTransparency(EGO, 100);
:)
~Cheers
Doesn't it slow things down?
Ah, hell. As I said, we need
character[CHARID].visible
and that's it.