ID:2902833
 
(See the best response by Ter13.)
Code:
obj
sky
icon = 'skies/morning.dmi'
screen_loc = "1,1"
layer = BACKGROUND_LAYER


Problem description:

I set thise image as an onscreen object, it's a 672x637 image with a backdrop on it for a side-scroller.

It functions fine and does what it's supposed to do, but when I make atoms in the world opaque (opacity=1) then the image shows everywhere instead of darkness.

Is there a way I can still have this as an onscreen object, but still have darkness show behind opaque turfs and objects? Maybe it would be possible by changing the layer? Whenever I give it a different layer it covers everything.

Thanks if you can help,

Bumblemore (Johnny) :)
Bump
Show screenshots.
Yes, there is, not with this command. The right thing to do would be to create another one, I don't have the capacity to do that. But I know it can. ^.^'

We can show people things that are unique to them.
Create another what? :) Another layer, screen object?
Try making the layer BACKGROUND_LAYER - 100
Background layer - 100... got it. I'll try that now
Hmm unfortunately when I got into any minus number the sky image covers everything including the HUD.

I tried making it a positive number aswell but thats just the same as the original
In response to Bumblemore
Show me how you did it.

Also, do you have discord? If so, give me you name. It's much easier to chat.
So, I did a bit of searching. One of the BYOND gurus gave an answer ages. So I will steal it:

obj/parallax_background
icon = 'whatever.dmi'
plane = -1
screen_loc = "CENTER"


A calculation of the distance of the blocks. So we move the image to the client.

var/image/I = image('icon.dmi',turf) //make an image attached to turf

usr << I //allow usr to see it
In response to Klogaum
Klogaum wrote:
A calculation of the distance of the blocks. So we move the image to the client.

var/image/I = image('icon.dmi',turf) //make an image attached to turf

usr << I //allow usr to see it

So with this method, the image would be in the world following the client around, but only they would be able to see it?
In response to Meme01
Meme01 wrote:
So, I did a bit of searching. One of the BYOND gurus gave an answer ages. So I will steal it:

> obj/parallax_background
> icon = 'whatever.dmi'
> plane = -1
> screen_loc = "CENTER"
>



I'm going to do some research tonight on "parallax background"

I've never used plane instead of layer before
Bump
Did the plane being -1 not work?
Best response
Adding SEE_BLACKNESS to the player mob's sight variable will cause darkness to be rendered as tiles on plane 0. This will allow you to arrange things in front and behind it deliberately. Blackness tiles cannot be configured to render on a different plane than plane 0.

Anything you want to render under them must be on plane 0 or below.
UPDATE: So I changed the sky from an onscreen object to a world object that follows the user around, and the effect is the same.

OK the next thing I will try is changing the objects bound width and bound height. I have a sneaking suspicion that it is the bounds of the image that is causing it to overlap the darkness
It has to be possible because SS13 has got this but I've tried all the things you guys said and nothings changed
bump
Page: 1 2