Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: duanne_boy on Thu 27/09/2012 15:10:08

Title: object walkible?
Post by: duanne_boy on Thu 27/09/2012 15:10:08
hi
can you have a object in a room and be able to walk on it?

i have placed one in my room and when i walk the char over to it, the object ends up covering the char.

the object is like a small box that when stood on changes to another sprite image.

was thinking if i made the box image apart of the background so it can be walked on then have the sprite change when char. stands at the hot spot.
im just not sure

kind regards Duane
Title: Re: object walkible?
Post by: Crimson Wizard on Thu 27/09/2012 15:25:05
There is a object property called "Baseline". It defines where object "touches" the ground.
http://www.adventuregamestudio.co.uk/wiki/?title=Object_functions_and_properties#Object.Baseline
When objects and characters are drawn on screen, those with lower coords (closer to 0) are drawn below and those with higher coords are drawn above.
To make an object always be below characters, it's Baseline should be very low, just not 0 (because 0 makes it has Baseline equal to real position on screen). In other words, set object's Baseline to 1.