Need some help with Terrain CRPL

MysteryCreeper · 450

MysteryCreeper

  • Jr. Member
  • **
    • Posts: 11
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?



Builder17

  • Community Guild
  • *****
    • Posts: 1101
  • My account picture is from Nitrome Mutiny.
Reply #1 on: December 08, 2019, 04:47:34 am
I want for a specific patch of terrain to be repeatedly having it's height set to something. How do I do that?

Code: [Select]
$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. :)