Need some help with Terrain CRPL

Started by MysteryCreeper, December 07, 2019, 10:21:05 PM

Previous topic - Next topic

MysteryCreeper

I want for a specific patch of terrain to be repeatedly having it's height set to something. How do I do that?

Builder17

Quote from: MysteryCreeper on December 07, 2019, 10:21:05 PM
I want for a specific patch of terrain to be repeatedly having it's height set to something. How do I do that?

$TerrainHeight:5
$XAreaSize:3
$YAreaSize:3

#SetTerrain every frame to specific height

once
@Awake
endonce

CurrentCoords ->y ->x

<-y <-YAreaSize add <-y <-YAreaSize sub do
<-x <-XAreaSize add <-x <-XAreaSize sub do
I J <-TerrainHeight SetTerrain
loop
loop

15 Delay

:Awake
Self CONST_COUNTSFORVICTORY FALSE SetUnitAttribute
Self CONST_NULLIFIERDAMAGES FALSE SetUnitAttribute
Self CONST_TAKEMAPSPACE FALSE SetUnitAttribute
Self CONST_SUPPORTSDIGITALIS FALSE SetUnitAttribute

        Self "main" "None" SetImage


TerrainHeight is obvious, XAreaSize and YAreaSize tell area size to keep that terrain height.

Place core to middle of area. :)