Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: flamingdog on Thu 24/03/2005 04:39:05

Title: Interactive Character... offscreen? (SORTED)
Post by: flamingdog on Thu 24/03/2005 04:39:05
Hi,

I'm really really new to this AGS thing, and I'm starting to get to grips with some of the basics of the engine, to the point where I think I'm more or less ready to work on my first 'proper' puzzle.

My little vignette involves a guy trapped in a room, and I want to have him be able to talk to the guard on the other side of the locked door, but I can't seem to figure out the best way to have the guard character 'there', but not visible... can anyone give me some pointers as to how I can do this? Could I do it by making an invisible sprite for him, and positioning him in the right place, or is there a more elegant way to achieve it? When I get the puzzle done, I'll post the results!

Thanks!

Flamingdog
Title: Re: Interactive Character... offscreen?
Post by: MrColossal on Thu 24/03/2005 05:06:21
If a character is not in the room and you make them speak, the text will appear in the last place they were, give it a try

there is also, in the manual SayAt which lets you place the text on screen in a certain spot.

Any of that help?
Title: Re: Interactive Character... offscreen?
Post by: Radiant on Thu 24/03/2005 08:39:42
If needed for other commands (e.g. you want Sierra-style speech rather than Lucas, or need the character to move or turn or whatever), I'd suggest
1. sticking him in a non-walkable behind some walkbehind,
2. sticking him off-screen, or
3. using SetCharacterTransparency (char, 100)
Title: Re: Interactive Character... offscreen?
Post by: Huw Dawson on Thu 24/03/2005 09:29:18
For me, all I do is stick 'em behind a walk behind area you can't get to. Then start up a dialouge, and BINGO.
Title: Re: Interactive Character... offscreen?
Post by: Candle on Thu 24/03/2005 10:45:13
SetCharacterTransparency
SetCharacterTransparency (CHARID, int amount)

Sets CHARID to be AMOUNT % transparent.
Setting AMOUNT to 100 means it is totally invisible, and lower values represent varying levels of transparency. Pass AMOUNT as 0 to stop the character being transparent.

NOTE: Transparency currently only works in hi-color games, and the character sprites must have been imported in hi-colour for the transparency to work.

NOTE: Having a large transparent character can significantly slow down the engine.

Example:

SetCharacterTransparency(EGO,50);

will make the character EGO look semi transparent.
Title: Re: Interactive Character... offscreen?
Post by: don_tomaso on Thu 24/03/2005 19:47:51
You can also just make a view which only has one, invisible, sprite, and then when you need to have an invisible character you tell it to use that view instead
Title: Re: Interactive Character... offscreen?
Post by: flamingdog on Fri 25/03/2005 00:10:34
Thanks everyone! I'll give it a try. SayAt sounds like it might work the best... not sure. I'll play around and see.

Thanks again!

FD

EDIT: I solved it, all I did was take my guard character and put him in 'room 2' (which technically doesn't exist yet), and then made it so the dialog runs when you interact with the door. A few alterations to the dialog tree to make it plausible, and hey presto! Thanks for your help, all.