The Daily Click ::. Forums ::. Klik Coding Help ::. Layer Object Help
 

Post Reply  Post Oekaki 
 

Posted By Message

jamesh



Registered
  2/28/2012 3:24:25 PM
Points
  380
4th March, 2012 at 3/4/2012 1:51:31 PM -

Hi

Is there any way to make the layer object only apply to a specific group of objects?

I am fixing a little game and would like certain objects (trees, houses, etc) to be sorted by their Y Coordinate, but have others (eg the Cursor) always at the front.

Any help would be much appreciated

Thanks

James

 
n/a

Chris Burrows



Registered
  9/14/2002
Points
  2396

GOTW WINNER OCT. 2011
4th March, 2012 at 3/4/2012 11:39:38 PM -

There are lots of ways to do this. I'd have to take a look at your mfa to see how your code works but you can just put all the objects you want in front on a separate layer. Of if you want them on the same layer for whatever reason, just add the event "ALWAYS: Move Cursor to Front".

 
n/a

jamesh



Registered
  2/28/2012 3:24:25 PM
Points
  380
5th March, 2012 at 3/5/2012 12:48:16 PM -

What I'm currently doing is sort > by Y increasing (or decreasing, I forget which right now). I've got an Always move cursor to front event, which was effective before I tried the layer object...

 
n/a

Del Duio

Born in a Bowling Alley

Registered
  7/29/2005
Points
  867

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
5th March, 2012 at 3/5/2012 3:02:04 PM -

Yeah, you could do what Chris suggests and have it so that whenever the cursor is overlapping a member of that group of objects (ex. Neutral, Enemies, etc) than move the cursor in front of said object.

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

Kai Proton



Registered
  1/31/2005
Points
  337

Wii Owner
14th March, 2012 at 3/14/2012 8:51:59 PM -

How about..
You have the cursor in its own layer, and have an invisible Active object following its XY on the layer you want,

then the cursor Layer is always where you want it,,


 
----------------------
Time for a Sexy Party!
----------------------

SolarB



Registered
  12/26/2011
Points
  214
15th March, 2012 at 3/15/2012 12:26:34 AM -

Have your cursor on a separate layer and whenever you need it to perform a function on an object on another layer just use:

always
-> set cursor to layer 'x'

cursor is over 'y' (or whatever)
-> perform function

always
-> set cursor to layer 'top'

 
n/a
   

Post Reply



 



Advertisement

Worth A Click