Knuckle Cracker

Creeper World 3 => Custom Map Discussion => Colonial Space Map Discussion => Topic started by: AutoPost on December 01, 2017, 11:18:23 AM

Title: Custom Map #5078: Artifact of odin Mortar -Concept-. By: Nebur7420
Post by: AutoPost on December 01, 2017, 11:18:23 AM
This topic is for discussion of map #5078: Artifact of odin Mortar -Concept-
(http://knucklecracker.com/creeperworld3/queryMaps.php?query=thumbnailid&id=5078)

Author: Nebur7420
Size: 99x99

Desc:
This is my first attempt at CRPL. I still have much to learn, I will include the code on the forrum post :). Please give me some feeback or ideas on what to make :).
Title: Re: Custom Map #5078: Artifact of odin Mortar -Concept-. By: Nebur7420
Post by: nebur7420 on December 01, 2017, 11:20:54 AM
Hello,

As prommised here is the code I used for the mortar.
Change the max ACammo in de CRPL unit to change the required ammo to shoot.

# Test.crpl
# Created on: 12/1/2017 3:42:57 PM
# ------------------------------------------

if(lt(sub(GetUnitAttribute(Self CONST_MAXAMMOAC) 1) GetUnitAttribute(Self CONST_AMMOAC)))
FireAoo("CONVERT" GetDeepestCreeperCell)
SetUnitAttribute(Self CONST_AMMOAC 0)
endif

:GameLoaded
SetUnitAttribute(self CONST_REQUESTACPACKETS true)