News

How to use TerraformTilesOnPlanet action

Posted on Friday, July 10, 2015

I'm working on custom race like zerglings from StarCraft, and I want to add the custom race ability which will allow zerglings upgrade planet class on colonization trigger, but the game crashes on colonization. I've tried to use:

<Triggers>
      <OnEvent>OnColonizePlanet</OnEvent>
      <Target>
        <TargetType>Planet</TargetType>
      </Target>
      <PerformAction>
        <Action>TerraformTilesOnPlanet</Action>
      </PerformAction>
    </Triggers>

and

<Triggers>
      <OnEvent>OnColonizePlanet</OnEvent>
      <Target>
        <TargetType>Colony</TargetType>
      </Target>
      <PerformAction>
        <Action>TerraformTilesOnPlanet</Action>
      </PerformAction>
    </Triggers>