The Daily Click ::. Forums ::. Klik Coding Help ::. Counters aren't playing nice with actives
 

Post Reply  Post Oekaki 
 

Posted By Message

aphant



Registered
  18/05/2008
Points
  1242
16th March, 2009 at 03:28:03 -

I have a counter object, it updates every second to display the current time. I have another counter object, to track how many things have been picked up, updating when something is picked up.

If these overlap an animated active, then the active will come in front of both counters. When either counter updates, that counter will be on top of the active. Whenever the two meet, they seemingly fight each other to be on top. Order doesn't matter, either. I could have the counters set to be on top, but the active will still be in front. I could put the counters behind, and they'll still come in front of the active. It's bothering me, and I want it so that the counters are always on top.

 

Chloe Sagal

under the influence of FUN

Registered
  19/02/2009
Points
  607

Orange
16th March, 2009 at 03:30:05 -

try unchecking display as background. that usually makes it go stupid.

 
Patreon: http://www.patreon.com/chloesagal
Twitter: https://twitter.com/ChloeSagal

aphant



Registered
  18/05/2008
Points
  1242
16th March, 2009 at 03:36:36 -

Well, it stops making the two fight. But, the active comes out on top, which I don't want.

 

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
16th March, 2009 at 03:37:40 -

yes, uncheck display as background, when that is checked it updates that portion of the screen that contains the counter by drawing to the frame directly instead of displaying it as a sprite, it helps keep memory usage down but it generally just gets in the way.

EDIT: whoa i thought I posted first lol, you got to it before me!

EDIT 2: use the layer object to bring the counter to the front

Edited by UrbanMonk

 
n/a

Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
16th March, 2009 at 03:40:27 -

He's got that much figured out, as I gather from his answer to miss chloecakes. But what he's saying now is that when he does that, the active object is overlapping the counter. He wants the counter to be on top at all times. So what he could do is either put them on a higher layer (it's what I do, I'm so lazy I have nine layers in Baby Ghost) or he could just now in the level editor set it to be on top and in the event editor have it set the counter on top every time it gets updated. Or something.

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364

aphant



Registered
  18/05/2008
Points
  1242
16th March, 2009 at 03:42:41 -

Layers don't do it either. =\

 

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
16th March, 2009 at 03:43:54 -

if you check my edit you would see that he hadn't posted when I started writing my reply, but yes you're right he can just move the counter in front in the frame editor, also disregard my second edit, you can now adjust the order of counters at runtime without the use of the layer object.

EDIT: darn got me again!

What are you using, mmf2?

Edited by UrbanMonk

 
n/a

aphant



Registered
  18/05/2008
Points
  1242
16th March, 2009 at 03:55:10 -

Yeah, I'm using MMF2.

 

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
16th March, 2009 at 04:18:57 -

hmm, then it should work, are you sure the counters not on a lower layer?
Does the counter appear on top of the active in the frame editor?
Can you post a mfa?

 
n/a

aphant



Registered
  18/05/2008
Points
  1242
16th March, 2009 at 04:29:43 -

I see what the problem is. All these actives were placed after the counter, so they're in front regardless of what I say. It would appear that I have to either create the UI at runtime, or when I finish making the level.

 

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
16th March, 2009 at 04:34:41 -

That's strange, I just opened mmf2 and created a counter and a bunch of objects and I was able to order them anyway that I like regardless of when they were placed. I think you must be doing something wrong, but if you managed to figure out a way around the problem I guess its solved.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click