View Single Post
  #11  
Old 10-15-2009, 12:20 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
The only way you could do it is if it was on layer x above the objects, and once in the area of the player, set it to layer y under him.

But it would still draw under the tree.

The only way I can see this happening is doing the method I just stated, but checking if the player is in the area of an object with a layer above his own.

PHP Code:
temp.new_layer 3;

if (
plane_x in |player.xplayer.x+3| && plane_y in |player.yplayer.y+4|)
{
  
temp.draw_over false;
  
  for(
np:npcs)
  {
    if (
np.layer player.layer)
    {
      if (
player.x+1.5 in |np.xnp.x+(getimgwidth(np.image)/16)| && player.y+2 in |np.ynp.y+(getimgheight(np.image)/16)|)
        
temp.draw_over true;
    }
  }
  if (!
draw_over)
    
temp.new_layer 0;
}

showimg(200"plane.png"plane_xplane_y).layer new_layer
I just wrote that up quickly in notepad. lol

But...you get my point.
__________________

Reply With Quote