Custom Coin Counter

Post your fully complete LL levels here!

Moderator: Level Moderator

Forum rules
Please read these rules before commenting on a level: viewtopic.php?f=83&t=40959
If you need any help with posting levels, check this guide: viewtopic.php?f=83&t=49649

Custom Coin Counter


Rate this Level: This Level was rated 0 times with an average score of 0.00.This Level was rated 0 times with an average score of 0.00.This Level was rated 0 times with an average score of 0.00.This Level was rated 0 times with an average score of 0.00.This Level was rated 0 times with an average score of 0.00.

Postby Blablob » January 26th, 2013, 4:59 am

Custom Coin Counter

Here is a look at how you can make your own coin (or "Square") counters.

Code: Select all
150x50~.61bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.149bX.130abaa.6aaac.9bX.129abaa2.6ac3.8bX.128abaa3.6ac4.7bX.127abaa4.6ac5.6bX.88aa19.6aa144.6aa144.6aa125~~~~0;128;1496;1;0;0~6:coinTracker;0;2;9999;9999;1;1;subtitle,2,Coins%3A%20%7B%24g_COINS%7D,100:sleep,10:subtitle_off:goto,0|40;208;1464;|40;368;1488;|40;400;1488;|40;400;1456;|40;368;1456;|44;1056;1480;add,g_COINS,g_COINS,5|40;560;1488;|40;592;1456;|40;624;1424;|40;655;1393;|40;688;1392;|40;720;1392;|40;752;1392;|40;784;1424;|40;816;1456;|40;848;1488;|40;1152;1472;add,g_COINS,g_COINS,74|40:coin1;1568;1472;move,coin2,1456,1424,1,0|40:coin2;1413;1658;move,coin3,1539,1424,1,0|40:coin3;1496;1658;move,coin4,1456,1488,1,0|40:coin4;1413;1722;move,coin5,1524,1456,1,0|40:coin5;1461;1690;|2:exit;1913;1701|6;-1;1304;9999;9999;0;1;branch,5,2,g_COINS,100:goto,0:camera,1,0,0,0,exit,0,0,10:move,exit,1904,1504,1,0:sleep,30:cameraoff~Custom%20Coin%20Counter~Bryan%20Pearson~3~4;0;0~0~4;0~0;0;3~1359203977~0.3


To do this, I used a hitbox trigger, which displays the number of coins and goes through a loop so that it always updates. You have to be careful with loops though; if they run too quickly (e.g. without a sleep function), the game will lag horrendously. I found this out the hard way.

Here is how the hitbox trigger looks:

  1. Subtitle: "Coins: {$g_COINS}"
  2. Sleep: 10 frames
  3. Subtitle Off
  4. Go to Line 1

Pretty self-explanatory. You can change the Sleep function to update however often you like. Something interesting I found out is that no matter how low you set the Sleep duration, the game won't lag; however, a sleep duration of say 1 or 2 makes Subtitles to read because they appear and disappear too quickly (play around with it yourself to see what I mean). Also, you need that Subtitle Off function otherwise subtitles will keep appearing on top of each other.

A couple other things I'll point out: Super Squares are kind of broken right now. Besides not having a sound effect, they won't automatically update the coin counter. You have to manually use the Add function to add the amount of coins you want. You can also customize the value of regular Squares by doing the exact same thing. (Just subtract 1 from however many coins you want to add, because Squares will add 1 by default.)
User avatar
Blablob
Content for Contempt

 
Posts: 3108
Joined: September 6th, 2009, 3:38 pm
Location: That way

Credit To Team

Thumbs Up given: 67 times
Thumbs Up received: 229 times

Re: Custom Coin Counter

Postby Raz » January 26th, 2013, 10:52 am

Runouw said super squares are special, not made to add to the kill counter. EDIT: coin, not kill. was just messing with stuff on minecraft


Also, did a similar thing in my shop level. I did something different though.
I set all the squares to stop the trigger then activate the trigger that displays the amount of coins.
it's really easy if you just use shift to place all the squares, so you don't have to addthat trigger to each one over and over.
Karyete, Master of Civil Conversation
Disclaimer: none of these messages have been edited, context can be provided if needed (thanks discord!) but absolutely does not change anything about these messages and that he's too overly defensive and cocky to make situations better

Karyete: I don't have anything to say to you, I've been deliberately trying to not offend you for years, actually, but apparently everything I say to you is wrong. You come across as so aggressive that you successfully intimidated me into not wanting to talk to you
Karyete: Seriously, what is your problem? And not only that, you fail to even acknowledge you might be in some wrong here.
Karyete: Oooh it's you? Hello. Feel free to drop this right now. You're going to make yourself look like an idiot.
Karyete: We don't want to hear your opinion at this stage.
Karyete: You're not getting any apology, especially after now.
Karyete: You can stay up on your high horse, continue to twist the truth and act like an absolute child all you want. I refuse to give respect to a man who right now is picking up a dropped argument because he simply cannot fathom the idea that he might be in the wrong.
Karyete: How pathetic
User avatar
Raz
"quite easily the most manly man of all" --Raz

Error contacting Twitter
 
Posts: 4432
Joined: July 12th, 2010, 5:48 pm
Location: :-)

Razzian Fighter

Thumbs Up given: 40 times
Thumbs Up received: 367 times

Re: Custom Coin Counter

Postby fourinone » January 26th, 2013, 11:09 am

Code: Select all
150x50~.7050aa450~~~~0;144;1464;1;0;0~40;235;1473;stoptrigger,coincounter:activate,coincounter|6:coincounter;112;1422;64;64;0;1;subtitle,1,Coins%3A%20%7B%24g_COINS%7D,50:sleep,9999:goto,1|40;266;1473;stoptrigger,coincounter:activate,coincounter|40;295;1471;stoptrigger,coincounter:activate,coincounter|40;322;1472;stoptrigger,coincounter:activate,coincounter|40;256;1434;stoptrigger,coincounter:activate,coincounter|40;283;1434;stoptrigger,coincounter:activate,coincounter|40;303;1436;stoptrigger,coincounter:activate,coincounter|44;392;1472;add,g_COINS,g_COINS,10:stoptrigger,coincounter:activate,coincounter~My%20Level~~1~1;0;0~0~0;0~0;0;3~1359227121~0.3


Here's the way I did it. It updates immediately upon collecting a coin, and keeps the subtitle paused otherwise.
ImageImageImage
YOU ARE NOW MANUALLY BREATHING
User avatar
fourinone
Honorary Member

 
Posts: 542
Joined: August 1st, 2009, 3:27 pm

Thumbs Up given: 5 times
Thumbs Up received: 40 times

Re: Custom Coin Counter

Postby Blablob » January 26th, 2013, 11:47 am

Raz wrote:I set all the squares to stop the trigger then activate the trigger that displays the amount of coins.
it's really easy if you just use shift to place all the squares, so you don't have to addthat trigger to each one over and over.

That's not what I did, though. I used a single hitbox trigger which covers the entire level. I didn't do anything to the squares themselves.
User avatar
Blablob
Content for Contempt

 
Posts: 3108
Joined: September 6th, 2009, 3:38 pm
Location: That way

Credit To Team

Thumbs Up given: 67 times
Thumbs Up received: 229 times


Return to Last Legacy