The Daily Click ::. Forums ::. Klik Coding Help ::. How to make an active appear in front of an active when in front of it, and appear in back when in back of it
 

Post Reply  Post Oekaki 
 

Posted By Message

path



Registered
  03/04/2012 20:35:07
Points
  288
31st August, 2012 at 31/08/2012 03:03:43 -

Hey does anybody know a method for this? I was trying something like this
https://www.dropbox.com/s/4wyynsuy3xo6ryz/Untitled1.png
Doesnt work well. Wut i was trying to do is make the player appear over active when in front of it
and appear back of it when near the back of it.

 
Nifty stuff & MFAS :
https://www.mediafire.com/folder/b6f0ex3ozd24c/pub

hapsi



Registered
  13/11/2003
Points
  775
31st August, 2012 at 31/08/2012 16:48:59 -

Use "bring in front of an object" or "-II- behind" -action and select the object you want the first object to be behind. (Only TGF2/MMF2(/Dev))

 
[Signature][/Signature]

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
31st August, 2012 at 31/08/2012 18:34:01 -

You might also want to have those other objects as part of a Group.

Compose events this way, and see if it works for you. Leave out the stuff about XPos.


IF YPos ("Group.0") > YPos ("Link")
Always
THEN Move Group.0 in front of Link
AND Move Link behind Group.0

///

IF YPos ("Group.0") < YPos ("Link")
Always
THEN Move Group.0 behind of Link
AND Move Link in front of Group.0




Edited by s-m-r

 
n/a

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
31st August, 2012 at 31/08/2012 18:47:49 -

An alternative (and I think I used this before, now that I've pondered for a bit):



IF Group.0 is overlapping Link
AND YPos ("Group.0") > YPos ("Link")
THEN Move Group.0 in front of Link
AND Move Link behind Group.0

If Group.0 is overlapping Link
AND YPos ("Group.0") < YPos ("Link")
THEN Move Group.0 behind Link
AND Move Link in front of Group.0



 
n/a

hapsi



Registered
  13/11/2003
Points
  775
31st August, 2012 at 31/08/2012 19:31:01 -


Originally Posted by s-m-r
An alternative (and I think I used this before, now that I've pondered for a bit):



IF Group.0 is overlapping Link
AND YPos ("Group.0") > YPos ("Link")
THEN Move Group.0 in front of Link
AND Move Link behind Group.0

If Group.0 is overlapping Link
AND YPos ("Group.0") < YPos ("Link")
THEN Move Group.0 behind Link
AND Move Link in front of Group.0




Doesn't this move every active A in the group behind active B? What if there is several Active A:s and B:s..?

 
[Signature][/Signature]

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
31st August, 2012 at 31/08/2012 20:16:15 -

But my assumption, based on the artwork he submitted in the screen shot, is that there's one "Link" character and possibly several of the other objects.

If there are several instances of each group, then yeah, do the following:

- spread values starting at 0 for each Group;
- do a fastloop check for each instance of one of the Groups (preferably the one fewer in number);
- change the order based on the Event structure above.

Adding in the fastloop would be the next best thing, in my opinion. Just try to do the fastloop check based on the group that's fewer in number, to prevent additional lag.

 
n/a

path



Registered
  03/04/2012 20:35:07
Points
  288
31st August, 2012 at 31/08/2012 21:53:21 -

im still having a problem with this
heres wut i tryed but its not working
https://www.dropbox.com/s/roe03hqxqh052rk/Untitled22.png
s-m-r would u be able to showme an example mfa file?

 
Nifty stuff & MFAS :
https://www.mediafire.com/folder/b6f0ex3ozd24c/pub

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
1st September, 2012 at 01/09/2012 01:58:11 -

Check your TDC mailbox; I sent you the link to an example there.

For others curious about how I attempted to approach this issue, here's a link:

http://www.let-off.com/software/examples/yposition/yposition-order-example.mfa

 
n/a
   

Post Reply



 



Advertisement

Worth A Click