I'm trying to add in shadows of buildings for my game, so that players can hide in shadows and not be seen. I have the icons and everything created, and that all works fine. However, the shadows dont appear on top of the player.
Now, the simple answer to this would be "change the layer, derp." I did. To 100. The player was still on top of the shadows. I am using pixel movement (thank you forum account), and would like some help on this issue.
Thank you in advance, all those that do not troll :3
EDIT: I realise it has something to do with the pheight variable from forum_accounts pixel movement library, due to testing. But it still doesnt work right for me.
ID:155925
Feb 4 2011, 9:44 am
|
|
In response to Bravo1
|
|
I'm no newb. I understand that part. Its just i did that, and it doesnt work. Im using the pixel movement library provided by Forum_account, and im using it in top-down view.
For some reason, if i put the pixel_z up to, say, 100, it works fine. However, by doing this the icon is raised to a level above where i want it placed. I've tried setting the shadow object's layer to 100, and the player's level to 3. But for some reason, it doesnt work. I think it has something to do with the whole "pixel movement" part, because i know it would work otherwise. |
In response to Darkoro
|
|
Then just use pixel_z...
If that doesn't work then you're going to have to talk to forum_account because noone else feels like going through his entire pixel movement library |
The library does modify the layer of objects to correct some display glitches in the built-in isometric mode. You should be fine if you do things like this:
// instead of |
In response to Forum_account
|
|
<s>Will this work for the top-down view too?</s>
Edit: Thanks, it worked. :3 |
In response to Darkoro
|
|
What type of object are you using for the shadow? Try using an area instead of a turf or object.
|
so, to reiterate:
1# move the shadow into it's own icon if it's not already
2# place the shadows on the map (if the shadow is a png or something of the sort, then make sure to use "add"(
3# make sure the shadows layer is above the mob layer
4# make sure the shadows density is 0 (so you can walk into it)