Hi all,
using AGS i asked myself how to show a door open/closed.
Someone suggested me to create a new object with the door open, for example, to make it visible when the player opens the closed door (which is an hotspot, instead).
I'd like to know if there are other ways to do that.
If you'd prefer to use an object instead of a hotspot, you could just change the graphic property for the door. For example:
function WhenTheDoorIsUsed(){
if (oDoor.Graphic=11){
oDoor.Graphic=12;
}
else {
oDoor.Graphic=11;
}
}
oDoor would be the name of the door object, 12 would be whatever sprite slot the open door animation is set to, and 11 would be the sprite slot for the closed door animation.
What this is going to do is test to see whether the door is open or closed and then switch it to the opposite state accordingly.
Thank you!
You're quite welcome.
Quite? :D
http://dictionary.reference.com/browse/quite