This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
crpl:crpltutorial:interactive:advancedemitter [2015/03/20 14:22] – [Progressive output] Updated content + asked question TheDutcher | crpl:crpltutorial:interactive:advancedemitter [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ~~DISCUSSION: | ||
< | < | ||
====== Creating a custom emitter ====== | ====== Creating a custom emitter ====== | ||
Line 24: | Line 23: | ||
We want the script to be very portable, so instead of coding the values into the script, we'll use input variables. These will be Amt, Delay, AmtIncrease, | We want the script to be very portable, so instead of coding the values into the script, we'll use input variables. These will be Amt, Delay, AmtIncrease, | ||
- | < | + | < |
$Delay:15 | $Delay:15 | ||
$AmtIncrease: | $AmtIncrease: | ||
Line 31: | Line 30: | ||
$DeathAmt:" | $DeathAmt:" | ||
And as it is an emitter, simple code to make it emit Creeper. | And as it is an emitter, simple code to make it emit Creeper. | ||
- | < | + | < |
# but only emit so much so that the creeper level is at least as much as ' | # but only emit so much so that the creeper level is at least as much as ' | ||
CurrentCoords <-Amt SetCreeperNoLower | CurrentCoords <-Amt SetCreeperNoLower | ||
Line 40: | Line 39: | ||
You probably need a good popup text to make sure people think it's a normal emitter. Simply add these 2 lines and you're done. | You probably need a good popup text to make sure people think it's a normal emitter. Simply add these 2 lines and you're done. | ||
- | < | + | < |
" concat " | " concat " | ||
Line 51: | Line 50: | ||
== Set PZ creation on death == | == Set PZ creation on death == | ||
If you would like to force a PZ to appear or perhaps not to appear, that is done easily with the following snippet:\\ | If you would like to force a PZ to appear or perhaps not to appear, that is done easily with the following snippet:\\ | ||
- | < | + | < |
Explaining in-depth what it does:\\ | Explaining in-depth what it does:\\ | ||
__// | __// | ||
Line 63: | Line 62: | ||
This function is automatically called the moment the unit is destroyed.\\ | This function is automatically called the moment the unit is destroyed.\\ | ||
Since we declared a variable called DeathAmt, lets release that much creeper upon death! | Since we declared a variable called DeathAmt, lets release that much creeper upon death! | ||
- | < | + | < |
CurrentCoords < | CurrentCoords < | ||
< | < | ||
Line 71: | Line 70: | ||
FIXME | FIXME | ||
- | < | + | < |
+ | > I would assume increasing the creeper emission amount e.g.< | ||
+ | if(<-Amt <-AmtMax neq) | ||
+ | < | ||
+ | endif </ | ||
+ | </ | ||
==== Digitalis support ==== | ==== Digitalis support ==== | ||
+ | Simply add this code to the file to add Digitalis support | ||
+ | < | ||
+ | if(CurrentCoords GetDigitalis eq0 CurrentCoords GetDigitalisGrowth 1 eq eq) | ||
+ | CurrentCoords 1 SetDigitalis | ||
+ | endif | ||
+ | </ | ||
+ | If there is any DigitalisGrowth //(The white Digitalis-like stuff that shows where it will grow)// under the core, Digitalis will grow. | ||
==== Phantom/ | ==== Phantom/ | ||
==== Flip emitter ==== | ==== Flip emitter ==== |