ForeverZer0 Custom Resolution bug

Started by seokjin49, July 18, 2011, 10:03:52 am

Previous topic - Next topic

seokjin49



there is an big dragon event right there. :p

and if an event or actor walk above it, the event or actor goes on top of the big dragon event unless the actor is 'right above' the dragon event.

i just used dragon as an example but any other big events works like that.

is there any way to fix it?

this thing kinda matters importantly in the game i'm developing for kids.

Please if anyone knows, help.

thank you

Apidcloud

Well, that's a character depth problem (known as z in this case)

You said that the depth was ignored (as it is on that print screen) unless the actor or anything else was right above the event?

On his method, there's this(it says exactly what you said-> above) :

above, z = characters.find {|chr| chr.x == @x && chr.y == @y - 1 }, 0
if above != nil
        # If found, adjust value by this one's Z, and the other's.
        z = (above.screen_z(48) >= 32 ? 33 : 31)
      end


Basically with his logic he's checking if there are any $game_players right above the character...
chr.y == @y - 1 does that (notice that Y's axis is the opposite than it is on maths)

To correct it in terms of that big chars, you replace it to this:
above, z = characters.find { |chr| (chr.x == @x - 1 || chr.x == @x || chr.x == @x + 1) && chr.y == @y - 1 }, 0

As I don't know if he changed the sprite_character class somehow, I can't do it in terms of character width, that would check which characters need the +1, -1 on X and Y axis.

Anyway's, this should work
Sorry if not, I tried xD

See you ^^
Instead of wanting to be somebody else, rather become somebody else



"I will treasure the knowledge like a squirrel treasures acorns."


Gibbo Glast 2D Engine - The sky is no longer a limit