my character can walk on the cieling but I have a lamp on the cieling with a walkbehind,
the problem is that when the character is bellow the baseline he should be behind the lamp.
Is there a way a could make the baseline work upsidown??
(S/he uses my suggestion from this thread (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=20494.msg250887#msg250887).)
Try something like this:
// room script
//...
#define LAMP_BASELINE 50
function repeatedly_execute_always() {
//...
if (GetWalkableAreaAt(character[GetPlayerCharacter()].x - GetViewportX(), character[GetPlayerCharacter()].y - GetViewportY()) == CEILING_ID) {
// if character is on the ceiling's walkable area
if (character[GetPlayerCharacter()].y - GetViewportY() < LAMP_BASELINE) // if character is above lamp
SetCharacterBaseline(GetPlayerCharacter(), game.room_height); // draw character in front of lamp
else // if character is below lamp
SetCharacterBaseline(GetPlayerCharacter(), 1); // draw character behind lamp
}
else // if character is not on the ceiling's walkable area
SetCharacterBaseline(GetPlayerCharacter(), 0); // reset character's baseline
//...
}
Amazing
It works perfectly.
Cool!