Make Creeper Flow Uphill

Started by Atrex, April 30, 2014, 06:33:55 PM

Previous topic - Next topic

Atrex

This script only needs to run once, not continuously. However, terps won't change the way creeper flows over terrain unless the script is looped. If updateInterval is positive it will loop, but this is likely to slow down the game. If revertOnDeath is set to 1, destroying the CRPL tower will make the creeper flow normally again.

# CrazyTerrain.crpl
# Created on: 4/28/2014 9:16:09 PM
# ------------------------------------------
#Make the effective terrain level opposite the actual
#There is probably no practical use for this
#Running continuously allows for terp modification, but really slows down the game
$Stretch:1
$updateInterval:-1
$revertOnDeath:0
Once
MapWidth 0 do
MapHeight 0 do
I J 11 I J GetTerrain sub <-Stretch mul SetTerrainOverride
loop
loop
endonce
<-updateInterval 0 gt if
MapWidth 0 do
MapHeight 0 do
I J 11 I J GetTerrain sub <-Stretch mul SetTerrainOverride
loop
loop
<-updateInterval Delay
endif

:destroyed
if(<-revertOnDeath)
MapWidth 0 do
MapHeight 0 do
I J 11 I J -1 SetTerrainOverride
loop
loop
endif