And a very simple yet useful suggestion/request

Started by InCreator, Tue 21/10/2003 01:29:21

Previous topic - Next topic

InCreator

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)

RickJ

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.

Ishmael

SetCharacterTrasnparency, but I have some not so good memories of trying it once...
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Gilbert

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.


InCreator

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.

MrColossal

if you move a character to room -1 you can still have him talk and it talks from whatever coordinate he was last in
"This must be a good time to live in, since Eric bothers to stay here at all"-CJ also: ACHTUNG FRANZ!

Gilbert

Yeah right, but may not be good if it's the player character. It's completely okay for nonplayer characters.

Ishmael

AFAIK, the player character can be in diffrent room then the game is, as long as no MoveCharacter or similiar functions are run.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Pumaman

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.

DoorKnobHandle

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!

Scorpiorus

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

Ishmael

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?
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

InCreator

IT IS the same. Mamarulez just didn't read this thread before posting.

Ishmael

I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

TerranRich

And why won't SetCharacterTransparency() work exactly?
Status: Trying to come up with some ideas...

Scorpiorus

#15
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

InCreator

#16
Doesn't it slow things down?

Ah, hell. As I said, we need
character[CHARID].visible
and that's it.


SMF spam blocked by CleanTalk