The Daily Click ::. Forums ::. Klik Coding Help ::. A counter question...
 

Post Reply  Post Oekaki 
 

Posted By Message

en kerro



Registered
  21/10/2004
Points
  578
20th February, 2006 at 17:50:54 -

Is it possible to make bring to front/back events to counter & lives objects? Because I have some bring to front events and sometimes you can't see the counters... I hope there is a solution for this problem!

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

X_Sheep

I had a custom rating before it was cool

Registered
  01/03/2004
Points
  1313

VIP MemberPicture Me This -Round 23- Winner!Dos Rules!
20th February, 2006 at 17:58:01 -

Nope, isn't possible with Lives or Counter objects.

 
a/n

en kerro



Registered
  21/10/2004
Points
  578
20th February, 2006 at 19:40:23 -

ARGH! So I must delete all bring to front events... and then gameplay goes shit! Hmm... I must invent something...

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
20th February, 2006 at 19:52:28 -

You can uncheck "Display as background (faster)" in Properties to make the counter display in front of active objects, but I don't know if this works outside MMF1.5.

 
http://www.davidn.co.nr - Games, music, living in America

X_Sheep

I had a custom rating before it was cool

Registered
  01/03/2004
Points
  1313

VIP MemberPicture Me This -Round 23- Winner!Dos Rules!
20th February, 2006 at 20:00:14 -

^ yes, that works in TGF too. You can't change the order ingame, though

 
a/n

en kerro



Registered
  21/10/2004
Points
  578
20th February, 2006 at 20:07:53 -

Oh... it didn't help because there was those 'bring to front' events in event editor...

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

Robbert



Registered
  19/06/2003
Points
  420
21st February, 2006 at 20:51:17 -

Maybe you can replace the counter for a text object or something?

 
Hey mates, I'm Iglo yeah =P!

norfair



Registered
  31/10/2002
Points
  244
21st February, 2006 at 21:36:10 -

wait.
In MMF ther's the layer object.
That can bring front/back whichever thing, and make related layer orders.

http://click.spatang.com/ext/view.php?ext=72



 
Radix says:
It's regrettable that TDC is the arsehole of the click scene, but somewhere has to be.

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
21st February, 2006 at 22:41:50 -

I often use active system boxes for counters instead

 
n/a

Mr. Esch

Stone Goose

Registered
  30/05/2003
Points
  0
22nd February, 2006 at 00:05:52 -

I would just make a custom counter based on an active objects and an invisible counter

 
Do you feel you are being... watched?

en kerro



Registered
  21/10/2004
Points
  578
23rd February, 2006 at 17:36:06 -

Is layer object also for tgf? If it's not, are there any other objects what can be used as counters (for tgf..)???

Image Edited by the Author.

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

norfair



Registered
  31/10/2002
Points
  244
23rd February, 2006 at 18:25:52 -

sorry, but I think thats an only-MMF extension.

to make an overfront counter with something else you can create an active with direction frames as painted numbers, so they show the direction related to wichever (or its internal) value; to display >32 numbers do another animation and set up the related animation usage via events.

well this is just an example; surely there are better ones...

Image Edited by the Author.

 
Radix says:
It's regrettable that TDC is the arsehole of the click scene, but somewhere has to be.

en kerro



Registered
  21/10/2004
Points
  578
23rd February, 2006 at 19:28:36 -

argh... takes time to do it... I hope there are some better ideas, although that was actually good

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

DanielRehn



Registered
  18/09/2002
Points
  139
24th February, 2006 at 01:25:17 -

If you are going t use active objects as counter replacements use one for each digit, this way you dont have to ork your ass off..
All actives have direction frames with numbers from 0 to 9 (thats 10 frames per active).
Now set the first active to the first digit

First digit
active dir = val(mid$($str(counter_value), 0, 1))

Second digit
active2 dir = val(mid$($str(counter_value), 1, 1))

etc..

PixElf:
Why use an invisible counter when you have values or the active objects?

Image Edited by the Author.

 
n/a

en kerro



Registered
  21/10/2004
Points
  578
27th February, 2006 at 07:26:48 -

That's how to do it with TWO digits. But how to do it if I have THREE?

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

DanielRehn



Registered
  18/09/2002
Points
  139
27th February, 2006 at 09:02:40 -

OMG.. How hard is this...

When you add something to the counter...

Set Counter = (Counter + x + 360) mod 360

x is the value you add...
IF yo plan to add values outside the range of -360 -> 360 then increment "+ 360" value!
eg. if you plan on using -1000 -> 1000, use 1440

another way to do this 100% accurate is using this formula

Set Counter = (Counter + x + (360 * ceil(ABS(x) / 360))) mod 360


 
n/a

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
27th February, 2006 at 09:04:14 -

Then keep using the mid$ function to get the digit that you want. It takes three values - the string that you want to get, then index to start from, and the number of characters to use (or is it the index to stop at? I can't remember.) Anyway, if it's the first, then use these:

1st: ...mid$(str$(value("counter"), 0, 1))
2nd: ...mid$(str$(value("counter"), 1, 1))
3rd: ...mid$(str$(value("counter"), 2, 1))

 
http://www.davidn.co.nr - Games, music, living in America

en kerro



Registered
  21/10/2004
Points
  578
27th February, 2006 at 15:37:28 -

...I'm confused. Can anyone explain it in one post? Too hard for me to understand...

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
27th February, 2006 at 16:16:52 -

I think Daniel's post spilled over from the other counter thread somehow - he posted at the same time as I did, and coincidentally it looked as if I was trying to follow on from him.

 
http://www.davidn.co.nr - Games, music, living in America

DanielRehn



Registered
  18/09/2002
Points
  139
27th February, 2006 at 17:25:02 -

Hehe... kinda cool...

 
n/a

en kerro



Registered
  21/10/2004
Points
  578
27th February, 2006 at 19:25:23 -

Oh... Now I understand it

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

en kerro



Registered
  21/10/2004
Points
  578
1st March, 2006 at 11:11:21 -

That Set active object direction to "val(mid$($str(counter_value), 0, 1))" didn't work. What's the problem?

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
1st March, 2006 at 12:46:18 -

I think it should be "str$" instead of "$str".

 
http://www.davidn.co.nr - Games, music, living in America

en kerro



Registered
  21/10/2004
Points
  578
1st March, 2006 at 19:33:11 -

didn't help

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

DanielRehn



Registered
  18/09/2002
Points
  139
1st March, 2006 at 19:36:47 -

You are aware that you cant use "counter_value" as well right?

 
n/a

en kerro



Registered
  21/10/2004
Points
  578
2nd March, 2006 at 09:19:45 -

I didn't use counter_value, I replaced it with value("counter1")

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

DanielRehn



Registered
  18/09/2002
Points
  139
2nd March, 2006 at 17:02:15 -

MMF
val(mid$(str$(value("counter1")), 0, 1))

Wont work with tgf though!

 
n/a

en kerro



Registered
  21/10/2004
Points
  578
3rd March, 2006 at 13:18:02 -

So that's the problem. Because I have TGF!

Any other ideas for "counters in the front of everything", please...?

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
3rd March, 2006 at 13:24:51 -

Don't know if this has been mentioned yet but the Layer Object can sort out the layering properties of text and counters in run time.. It's pretty snazzy. It works with most non-active objects (barring obvious background graphics).

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

DanielRehn



Registered
  18/09/2002
Points
  139
3rd March, 2006 at 13:47:48 -

You can use math to solve the problem

If you have a counter with the value 468, and want to transfer it to 3 active objects do like this

first digit ( 8 )
dir = value("counter1") mod 10

second digit ( 6 )
dir = (value("counter1") - (value("counter1") mod 10)) mod 100

third digit ( 4 )
dir = (value("counter1") - (value("counter1") mod 100))

and so on...

Image Edited by the Author.

 
n/a

en kerro



Registered
  21/10/2004
Points
  578
5th March, 2006 at 17:46:59 -

First digit works, but in second digit, it goes crap:

Real counter (digit 2): 0 Active Object (digit 2): 0
Real counter (digit 2): 1 Active Object (digit 2): 9
Real counter (digit 2): 2 Active Object (digit 2): 9
Real counter (digit 2): 3 Active Object (digit 2): 0
Real counter (digit 2): 4 Active Object (digit 2): 8
Real counter (digit 2): 5 Active Object (digit 2): 9
Real counter (digit 2): 6 Active Object (digit 2): 0
Real counter (digit 2): 7 Active Object (digit 2): 6
Real counter (digit 2): 8 Active Object (digit 2): 9
Real counter (digit 2): 9 Active Object (digit 2): 0

Strange, eh?

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

en kerro



Registered
  21/10/2004
Points
  578
6th March, 2006 at 11:26:08 -

Does anyone know what's wrong?
Is there something wrong in coding, or do I must put numbers to different directions in animation editor?

Now, number 0 is direction ->
And number 1 is above 0. And so on...
Number eight is in the top of direction "circle".
Are the numbers in wrong places?
It works with first digit, but second digit goes crap, as you see. What's wrong?

Image Edited by the Author.

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%
   

Post Reply



 



Advertisement

Worth A Click