Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Godwarrior on Tue 10/02/2009 23:03:13

Title: Doors
Post by: Godwarrior on Tue 10/02/2009 23:03:13
I have a house in my background and I don't know how to make my character enter it. How do I Do it?
Title: Re: Doors
Post by: on Tue 10/02/2009 23:12:47
Go to the room editor, create a HOTSPOT (over the door is a sensible place) and make a "use hotspot" interaction. In this interaction, you enter:

player.ChangeRoom(RoomNumber);

(where RoomNumber is the number of your "inside" room.) This allows you to enter the house by using the door.

More information about the fun you can have with hotspots is in the game manual if you find this too brief- the tutorial explains them in detail, and you can also check them via index search.  ;)
Title: Re: Doors
Post by: Khris on Wed 11/02/2009 08:07:05
Also, do the tutorial in the manual.

If you want the door to visibly open first, use an object instead of a hotspot and animate it if it's interacted with.
Title: Re: Doors
Post by: rbaleksandar on Wed 11/02/2009 09:07:18
You can also add (with the animated door) an animation of your character walking to and through the door, and disappearing in the house.
Title: Re: Doors
Post by: Ookki on Thu 12/02/2009 09:35:28
What's the easiest way to make a closed door not walkable and an open door walkable? What I mean is that I don't want to "use"/"interact" with an open door to get trough it I just want to "Walk to" it.
Title: Re: Doors
Post by: Khris on Thu 12/02/2009 09:54:24
Split up the walkable area into two separate ones and use Restore/RemoveWalkableArea() to switch it on/off.
Title: Re: Doors
Post by: Helme on Thu 12/02/2009 09:55:31
I like to work with regions. Assign that the player changes to room, when we walks over the region.
By opening the door, you activate the region, by closing you deactivate the region.