How to make a door that opens ??

Started by , Fri 28/11/2003 18:40:06

Previous topic - Next topic

Jeroen

Look.. Ive got a background with a door, the whole room is ready, now I need to move on to the next ( of course ), thru the door, but how can I make a door that opens ? ( Open door, door opens, so the character can get thru )

Ive already got a picture for the door that is open.

This is probably the most easy thing in whole AGS, but I am just started, and i couldnt find this in any FAQ, Tutorial.. or whatever...

Do i need to animate the background.. or...?? please do it step by step.. or give me a link to a tutorial about it...

Thanks!!

Totoro

Hello,
I think there are several possibilities. Until now I was too lazy to do opening doors, so I am not sure which is the most convenient, but you could make the picture of the opened door a single object, which appears at the position of the door as the result of your action opening the door. Then you can make a player-stands-on-object condition resulting in moving to the next room. Open, sesame !  ;D

CB..

yu could use the picture yu have for the background the one yu have now has the door shown closed?
create a new back ground with the door shown open
import in as one of the animated frames for the background /
then in as room loads

run script

edit script then copy this into the window and save

SetBackgroundFrame(0);


this will ensure that the background is the correct one showing the closed door as yu enter the room/ frame(0) is the view shown in the editor main window)

then create a region near the door
and use the if player has inventory item  ie a key or similar (or whatever idea yu have employed for opening the door)

run script

edit script and enter this

SetBackgroundFrame(1);
NewRoom(2);



Jeroen


Darth Mandarb

I do it in a different, perhaps more complicated than necessary, way.

I create the door as an object and just position it where I want it.  (I create an animation for it opening and closing.)

I create a HotSpot in front of the door which, when walked on, opens the door.  That hotspot is surrounded by another hotspot that shuts the door.

[color=0000aa]Hotspot 1[/color] is enabled when you enter the room.  Once you step upon that hotspot it animates the door opening, then disables itself (other wise the door would keep opening over and over) and it enables [color=00aa00]Hotspot 2[/color], which, when stepped on, animates the door closing, disables itself, and enables [color=0000aa]Hotspot 1[/color]

There is a walkable area under it all that allows you to walk off the side of the screen and the [color=00ADAD]Hotspot  3[/color]  takes you to the next room.

Like I said, it's a lot of scripting and can be confusing but it works perfectly over and over (if you walk back and forth)

Of course, this only works if the door doesn't require a button being pushed or a key being used to open it.

Hope it wasn't too confusing!

]).]v[.

Timosity

Yeah, DM, that's how I do it, Although you should probably use regions and not hotspots (ie player walk onto region) (although it should make no difference, that's one of the reasons regions were introduced, and stand on hotspot has a message that it is obsolete)

The other convenient thing about that is you can then have hotspots overlapping regions that give you different messages which can come in very handy in certain situations.

Darth Mandarb

#6
Timosity - This is such a dumb question, but are 'regions' a newer feature in AGS?  I still use 2.53 (haven't bothered to upload download the newest version 'cause I'm not to a point yet where I actually HAVE to use AGS! (just making the graphics/story etc.)

But somebody suggested regions to me and when I went into AGS I couldn't find them ...

** DM cringes waiting for the obvious answer ** ;D

SSH

DM- yes, that and lots of other spiffy features. If you're doing a custom GUI at 640x400 res, then I'd wait for 2.6 to go to release, as it makes it much easier...
12

Timosity

Sorry DM, I forgot about this post, but yeah, SSH probably filled you in, I think you'll probably find Regions very handy, not only for what I mentioned but you can use them for some very handy lighting effects.

but I'm no expert in these new features, I'm not sure if these are only handy for high colour games or both, and I'm asuming a lot of your work isn't in high colour (but so fucking good, you'd think it was)

~Tim

Darth Mandarb

Awesome!  

Now (especially with the alpha stuff) I drool with anticipation of using the new version!

Thanks guys!

]).]v[.

SMF spam blocked by CleanTalk