Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Rocco on Mon 19/04/2004 20:59:43

Title: acces areas behind objects?
Post by: Rocco on Mon 19/04/2004 20:59:43
problem is: how can i acces an area which is under an object?
for example i have an closed door, with interact i can open it and restore a walkable area,
i can script it in one rush to go trough and in the next room, but  i dont want this.
The problem is, when the open door is an overlaying object, i cant acces the walkable area behind.
The opposite with an open door in background and a closed one as object is also not satisfying,
cause i have a 2 sheets on the door, so i have 3 hotspots on the door - is it possible to set hotspots on an object?
Title: Re:acces areas behind objects?
Post by: stuh505 on Mon 19/04/2004 23:08:30
well im not exaclty sure what you're trying to do...but it sounds like you could use the same hotspot to open the door as to travel through the door by scripting a conditional statement that either opens the door if it hasn't already or loads a new room if the door has already been opened, i'd bet my pants you can't add hotspots to objects.  another option is you could make the room load from a region when you walk onto it but only if the door is open.
Title: Re:acces areas behind objects?
Post by: strazer on Tue 20/04/2004 00:16:46
I do the door thing this way:

I draw the background with the doorway only, no door:
(http://www.strazer.net/ags/doorroom.gif)

The door itself is an object that is visible right from the start:
(http://www.strazer.net/ags/doorshut.gif)

To open and close the door, I set up a view containing the door animation and call AnimateObjectEx:
1 (http://www.strazer.net/ags/doorshut.gif) 2 (http://www.strazer.net/ags/doorhalf.gif) 3 (http://www.strazer.net/ags/dooropen.gif)

This way the only thing clickable is the door.
Title: Re:acces areas behind objects?
Post by: Rocco on Tue 20/04/2004 13:25:35
@strazer: that dont works for me, cause i have renderbackgrounds, and if i remove the door complete i get wrong shadows.

@stuh505 how can an if statment look for an hotspot.
the idea with the region, is the same as with the walkable area i cannot reach it behind the object.
Title: Re:acces areas behind objects?
Post by: on Tue 20/04/2004 15:19:27
 You said "that dont works for me, cause i have renderbackgrounds, and if i remove the door complete i get wrong shadows."

How have you done it, then? Could you maybe post a screenshot to show how you've set it up?
Title: Re:acces areas behind objects?
Post by: Rocco on Tue 20/04/2004 22:16:08
For this time i make it the easy way and let the player pass the door, same time he opens it, cause i run out of time for the mags contest.