User Tools

Site Tools


crpl:crpltutorial:interactive:advancedemitter

This is an old revision of the document!


~~DISCUSSION~~ <-CW3 Home <-CRPL Home <-Interacive tutorials

Creating a custom emitter

Here I'll show you how to create your custom emitter. What will it have:

  • Custom image (optional)
  • Show popup text
  • Leave something other than a PZ
  • Progressive output with limit
  • Support digitalis

I will also cover how to turn it into a slip emitter or flip emitter.
It won't (as that's not what an emitter should do, also remember the game should be fair to the player):

  • Create runners
  • Send spore
  • Create new emitters on death

Custom image

Let's start simple with a custom image. You can easily skip this step as the game has a special emitter image built-in. Go HERE or HERE, download the emitter, open the map, go to edit -> units -> custom images, go to 64×64 and select the downloaded emitter.
To attach the image to a crpl core, simply double-click it and select the correct image in the image dropdown menu.

Basic script framework

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, AmtMax, DeathMode and DeathAmt.

Click to display ⇲

Click to hide ⇱

$Amt:10
$Delay:15
$AmtIncrease:0.1
$AmtMax:20
$DeathMode:1
$DeathAmt:"50"

Note that “DeathAmt” holds a string instead of a number, the game will convert these into integers at runtime when possible


And as it is an emitter, simple code to make it emit creeper.

CurrentCoords <-Amt SetCreeperNoLower
<-Delay Delay

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.

"Amt: " <-Amt concat "
" concat "Interval: " <-Delay 30.00 div 2 Round concat concat SetPopuptext

Leaving stuff behind

The hardest part probably, but the most important for huge maps to prevent power zone spam.

Progressive output

Negative increment

Digitalis support

Phantom/slip emitter

Flip emitter

crpl/crpltutorial/interactive/advancedemitter.1412190170.txt.gz · Last modified: 2025/02/14 14:56 (external edit)