Interesting method, thanks Speckford. Thanks again for the cool line of script code for the range of an enemy hit zone for a fighting brawler game! That was a great tip.
Here is a really cool and effective zdepth method I discovered thanks to Skydereign recently. Foreground objects appear in front, while background objects appear behind the foreground objects.
Copy/pasted from my other post in game development of City of Rott:
SUCCESSFUL CODE FOR ZDEPTH LAYERING OF ENEMIES AND PLAYER! Streets of Rage or Side Scrolling Brawler Style:
Add code to both enemy (and player) /draw actor/script editor:
- Code: Select all
if(yscreen+height/2>collide.yscreen+height/2) //I only half understand what this does. ;)
{
ChangeZDepth("Event Actor", yscreen+height/2);
}
else
if(yscreen+height/2<collide.yscreen+height/2)
{
ChangeZDepth("Event Actor", yscreen-height/2); //This is the same as above, but minus after yscreen.
}
Here's a brief "tutorial" example of how it works in action.