[CH2] Large Square Counter.
Posted: Fri Sep 05, 2014 8:07 pm
WARNING: If your level already lags, this will make it worse, depending on how rapidly the sleep duration refreshes the Counter.
So, it looks like I finally got this thing working right.
Below, I have a custom-made Counter that is, by default, set to work with a total of five different Large Squares (MAKE SURE IT IS PLACED WITHIN EACH SECTION OF THE LEVEL DIVIDED BY LEVEL SPLITTERS):
This activates it (MAKE SURE THE PLAYER IS FORCED TO AUTOMATICALLY TOUCH THIS, BE IT THE START POSITION OR RESPAWN POINTS, PLUS one of these should be at both sides of any level splitters, to make sure the Counter is activated at all times. This even includes going through doors or passages, plus wherever any Move Character trigger takes the player to, especially when across level splitters, and maybe more):
...And the 5 Large Squares (these are already set up to work the way they should):
One:
Two:
Three:
Four:
Five:
IMPORTANT: The Counter will not reset upon respawning. I have not tested this using global variables. This uses static variables.
If you want to change the total number of Large Squares that work with this, it isn't all that complicated, as long as you pay attention to how the functions differ. (AKA, I'm lazy atm.)
EDIT: Looks like I need to make a few changes. The Counter blocks dialog boxes...
EDIT2: Fixed. Simplified and no longer overlaps dialog boxes.
So, it looks like I finally got this thing working right.
Below, I have a custom-made Counter that is, by default, set to work with a total of five different Large Squares (MAKE SURE IT IS PLACED WITHIN EACH SECTION OF THE LEVEL DIVIDED BY LEVEL SPLITTERS):
- Code: Select all
llitem:6:LargeSquareCounter;256;3648;16;16;0;1;branch,5,6,s_largesquares,0:branch,5,8,s_largesquares,1:branch,5,10,s_largesquares,2:branch,5,12,s_largesquares,3:branch,5,14,s_largesquares,4:branch,5,16,s_largesquares,5:subtitle,1,%3CP%20ALIGN%3D%22LEFT%22%3E%3CFONT%20SIZE%3D%2230%22%20COLOR%3D%22%23FFCC33%22%3E%u0394%3C/FONT%3E%20%3CFONT%20SIZE%3D%2218%22%20COLOR%3D%22%23808080%22%3E0/5%3C/FONT%3E%3C/P%3E,0:goto,17:subtitle,1,%3CP%20ALIGN%3D%22LEFT%22%3E%3CFONT%20SIZE%3D%2230%22%20COLOR%3D%22%23FFCC33%22%3E%u0394%3C/FONT%3E%20%3CFONT%20SIZE%3D%2218%22%20COLOR%3D%22%23FFFFFF%22%3E1/5%3C/FONT%3E%3C/P%3E,0:goto,17:subtitle,1,%3CP%20ALIGN%3D%22LEFT%22%3E%3CFONT%20SIZE%3D%2230%22%20COLOR%3D%22%23FFCC33%22%3E%u0394%3C/FONT%3E%20%3CFONT%20SIZE%3D%2218%22%20COLOR%3D%22%23FFFFFF%22%3E2/5%3C/FONT%3E%3C/P%3E,0:goto,17:subtitle,1,%3CP%20ALIGN%3D%22LEFT%22%3E%3CFONT%20SIZE%3D%2230%22%20COLOR%3D%22%23FFCC33%22%3E%u0394%3C/FONT%3E%20%3CFONT%20SIZE%3D%2218%22%20COLOR%3D%22%23FFFFFF%22%3E3/5%3C/FONT%3E%3C/P%3E,0:goto,17:subtitle,1,%3CP%20ALIGN%3D%22LEFT%22%3E%3CFONT%20SIZE%3D%2230%22%20COLOR%3D%22%23FFCC33%22%3E%u0394%3C/FONT%3E%20%3CFONT%20SIZE%3D%2218%22%20COLOR%3D%22%23FFFFFF%22%3E4/5%3C/FONT%3E%3C/P%3E,0:goto,17:subtitle,1,%3CP%20ALIGN%3D%22LEFT%22%3E%3CFONT%20SIZE%3D%2230%22%20COLOR%3D%22%23FFCC33%22%3E%u0394%3C/FONT%3E%20%3CFONT%20SIZE%3D%2218%22%20COLOR%3D%22%23FFCC33%22%3E5/5%3C/FONT%3E%3C/P%3E,0:sleep,15:subtitle_off:goto,0
This activates it (MAKE SURE THE PLAYER IS FORCED TO AUTOMATICALLY TOUCH THIS, BE IT THE START POSITION OR RESPAWN POINTS, PLUS one of these should be at both sides of any level splitters, to make sure the Counter is activated at all times. This even includes going through doors or passages, plus wherever any Move Character trigger takes the player to, especially when across level splitters, and maybe more):
- Code: Select all
llitem:6:LargeSquareCounterstart;160;3528;32;64;0;1;activate,LargeSquareCounter
...And the 5 Large Squares (these are already set up to work the way they should):
One:
- Code: Select all
llitem:44:LargeSquare1;2064;2952;branch,3,4,s_largesquare1,1:add,s_largesquare1,s_largesquare1,1:add,s_largesquares,s_largesquares,1:goto,4:exit
Two:
- Code: Select all
llitem:44:LargeSquare2;3888;3520;branch,3,4,s_largesquare2,1:add,s_largesquare2,s_largesquare2,1:add,s_largesquares,s_largesquares,1:goto,4:exit
Three:
- Code: Select all
llitem:44:LargeSquare3;72;3440;branch,3,4,s_largesquare3,1:add,s_largesquare3,s_largesquare3,1:add,s_largesquares,s_largesquares,1:goto,4:exit
Four:
- Code: Select all
llitem:44:LargeSquare4;72;3488;branch,3,4,s_largesquare4,1:add,s_largesquare4,s_largesquare4,1:add,s_largesquares,s_largesquares,1:goto,4:exit
Five:
- Code: Select all
llitem:44:LargeSquare5;72;3536;branch,3,4,s_largesquare5,1:add,s_largesquare5,s_largesquare5,1:add,s_largesquares,s_largesquares,1:goto,4:exit
IMPORTANT: The Counter will not reset upon respawning. I have not tested this using global variables. This uses static variables.
If you want to change the total number of Large Squares that work with this, it isn't all that complicated, as long as you pay attention to how the functions differ. (AKA, I'm lazy atm.)
EDIT: Looks like I need to make a few changes. The Counter blocks dialog boxes...
EDIT2: Fixed. Simplified and no longer overlaps dialog boxes.