The Daily Click ::. Forums ::. Klik Coding Help ::. Layering Problem
 

Post Reply  Post Oekaki 
 

Posted By Message

\/\/olf

Creative Genius

Registered
  06/08/2005
Points
  76

VIP Member
23rd December, 2007 at 14:24:46 -

Hey, here's the problem I'm having with the game Im working on.

Image

Let me explain. See, the game is in the style of old genesis games such as the punisher, avengers, TMNT, etc etc. The problem I'm having right now is how to make sure that the enemies and the player look 'alright'. Meaning that if the player's feet are above an enemy's that means it should be behind it and vice versa. The same applies for all objects within the playing area, even if they are the copies of the same enemy. Any idea how to do this without making seperate objects? Has anyone done a tutorial on this? The TMNT engine has a lot of this problem, as far as I can tell.

As for the layer object, If i use that, it doesnt allow me to sort by an object's YBottom, does it? Also, there are other actives in the game that arent supposed to be affected by this but they do and it messes everything up. I also tried to sort them by using 'Bottom' detectors of both the enemy and the player but for some reason I cant seem to figure it out.

Image Edited by the Author.

 
Image

www.OldMansTale.net
Sign the Petition! Go go Go!!

nim



Registered
  17/05/2002
Points
  7234
23rd December, 2007 at 14:42:18 -

Always
Set Alterable Value A to YBottom (on all of the actives)
Order by Alterable Value A (on the layer object)

For any objects you want to appear in front of everything, just set their alterable value a's to 9999 or something.

 
//

\/\/olf

Creative Genius

Registered
  06/08/2005
Points
  76

VIP Member
23rd December, 2007 at 14:52:30 -

Great! That works perfectly! Now how do I make it so if one enemy is shot, not all die?

 
Image

www.OldMansTale.net
Sign the Petition! Go go Go!!

nim



Registered
  17/05/2002
Points
  7234
23rd December, 2007 at 15:16:42 -

Glad that helped.

Hmm, what's the event that destroys an enemy? Sounds like you're using groups/qualifiers.

 
//

\/\/olf

Creative Genius

Registered
  06/08/2005
Points
  76

VIP Member
23rd December, 2007 at 15:36:34 -

Haha, no that works great. And yeah, I was trying to make it easier for me by using qualifiers. So now, if I shoot one enemy, all of them die. Mmf should really have a 'self' expression. Any ideas?

 
Image

www.OldMansTale.net
Sign the Petition! Go go Go!!

nim



Registered
  17/05/2002
Points
  7234
23rd December, 2007 at 15:55:32 -

I've managed to get it to work before by duplicating the event conditions. For example:

"Bullet" collides with "Group.Bad"
+"Bullet" collides with "Group.Bad"

>Destroy "Group.Bad"

 
//

\/\/olf

Creative Genius

Registered
  06/08/2005
Points
  76

VIP Member
23rd December, 2007 at 16:12:44 -

hmmm, thats kinda strange but ill give it a try anyway.

 
Image

www.OldMansTale.net
Sign the Petition! Go go Go!!

\/\/olf

Creative Genius

Registered
  06/08/2005
Points
  76

VIP Member
23rd December, 2007 at 18:10:53 -

Very strange. It started working for no reason.

 
Image

www.OldMansTale.net
Sign the Petition! Go go Go!!
   

Post Reply



 



Advertisement

Worth A Click