Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-14-2009, 07:03 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Image layer stuff

Can anyone think of some manipulative and creative way to make a showimg draw under the player, but over objects that draw over the player(trees, drawoverplayer()...)?

I've been messing with the whole z+5/y+5 thing and couldn't figure anything out, but I figure I'd ask here before I finally give up.
Reply With Quote
  #2  
Old 10-14-2009, 07:11 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Untested guess:
PHP Code:
drawOverPlayer();
this.= -1;
this.-= 1
Reply With Quote
  #3  
Old 10-14-2009, 07:35 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Nope. An example:

I am in a level, I have a tree that draws over the player. I have a weapon... a remote control plane or something(a showimg). I want the plane to draw OVER the tree(fly over it), but UNDER the player.

This would be so useful for me, so I offer so many cookies to whomever helps me resolve this.
Reply With Quote
  #4  
Old 10-14-2009, 07:58 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
If that doesn't work, no idea. I'd go as far and say it's impossible.
Reply With Quote
  #5  
Old 10-14-2009, 09:28 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Couldn't you do something like
PHP Code:
with(findimg(200)) {
  
this.layer 2;
  
drawunderplayer();

Unless I'm completely confused by this.layer
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #6  
Old 10-14-2009, 09:54 PM
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
I don't think its possible?

What if your standing behind the tree that draws over you, and your showimg goes over the tree.

How can it show over the tree and under you at the same time?
__________________

Reply With Quote
  #7  
Old 10-14-2009, 09:55 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by oo_jazz_oo View Post
I don't think its possible?

What if your standing behind the tree that draws over you, and your showimg goes over the tree.

How can it show over the tree and under you at the same time?
Exactly what I want, actually. I dunno how, I was just hoping there was a creative solution to it.
Reply With Quote
  #8  
Old 10-14-2009, 10:08 PM
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
How is that what you want? XD

You cant have an image draw over and under an image at the same time...

Is this going to be used for something? Or just something you want to do?
__________________

Reply With Quote
  #9  
Old 10-14-2009, 10:12 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by oo_jazz_oo View Post
How is that what you want? XD

You cant have an image draw over and under an image at the same time...

Is this going to be used for something? Or just something you want to do?
I hope to use it for something. As for the logistics... well it might not seem like it makes sense, but that's where the whole creative/hackish things comes in.
Reply With Quote
  #10  
Old 10-14-2009, 11:39 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by DustyPorViva View Post
I hope to use it for something. As for the logistics... well it might not seem like it makes sense, but that's where the whole creative/hackish things comes in.
There's no creative/hackish way to make one thing be in two places at the same time?
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #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
  #12  
Old 10-15-2009, 12:31 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by LoneAngelIbesu View Post
There's no creative/hackish way to make one thing be in two places at the same time?
People have done creative and totally unexpected things with Graal. I gave up for a reason, but I didn't want to just throw it away as I wanted to do something cool with this, so I thought I'd see if anyone else could come up with anything.
Reply With Quote
  #13  
Old 10-15-2009, 01:12 AM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by DustyPorViva View Post
People have done creative and totally unexpected things with Graal. I gave up for a reason, but I didn't want to just throw it away as I wanted to do something cool with this, so I thought I'd see if anyone else could come up with anything.
Well, I mean... it's impossible. Well, I guess you could create a special case, for when the player is below an NPC (wouldn't know how to go about that...), and make it so that it only shows above the tree, rather than trying to show it above and below the player.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #14  
Old 10-15-2009, 01:15 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
Quote:
Originally Posted by LoneAngelIbesu View Post
Well, I mean... it's impossible. Well, I guess you could create a special case, for when the player is below an NPC (wouldn't know how to go about that...), and make it so that it only shows above the tree, rather than trying to show it above and below the player.
You mean exactly what I said in my example? ._.
__________________

Reply With Quote
  #15  
Old 10-15-2009, 04:36 AM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by oo_jazz_oo View Post
You mean exactly what I said in my example? ._.
Didn't read, because English > GS2.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:58 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.