Knuckle Cracker

Creeper World 3 => The Coder's Corner => Topic started by: milkev on February 05, 2016, 08:08:33 PM

Title: Supporting Digitalis
Post by: milkev on February 05, 2016, 08:08:33 PM
Hello, Im trying to create a map using only crpl cores but they dont seem to support digitalis. is there a way to do this? The option in the crpl's settings doesn't do anything.
Title: Re: Supporting Digitalis
Post by: GameGibu on February 05, 2016, 09:34:46 PM
Okay, the first thing to learn here is that there is a unit attribute called "CONST_SUPPORTSDIGITALIS". This is enabled by default and appears in the editor settings as "Supports Digitalis  •".

However, this actually only means that the tower will keep living digitalis alive. If I understand what you are asking, you need that core to have this code executed every implementation:
SetDigitalis(CurrentCoords 1)

In case you don't know where to put something to execute every implementation, it goes somewhere here:

# WhateverYourScriptNameIs.crpl # Created on: mm/dd/yyyy h:mm:ss # -------------------------------------------

SetDigitalis(CurrentCoords 1)

#the rest of your program


This is when it helps to have "Support Digitalis  •" on.

Hope this helps!
-GameGibu

Edit: this topic should be moved to The Coder's Corner (http://knucklecracker.com/forums/index.php?board=25.0). Thanks for asking the question though!  ;D
Title: Re: Supporting Digitalis
Post by: GoodMorning on February 14, 2016, 06:00:02 PM
The reason for this is shown in the CRPL docs for CONST_SUPPORTSDIGITALIS.
Supports is taken to be "keeps alive". Seeding it is another matter.

If your digitalis exists, this will maintain it, without withering.
However, this will not lay down live Digitalis, or awaken the dead form.

The Command for that is, as GameGibu said, SetDigitalis(CurrentCoords 1) or something similar.

Which gives me an idea for a map... anyway. Does that answer the question?
Title: Re: Supporting Digitalis
Post by: milkev on February 15, 2016, 06:28:30 PM
Yes thank you guys!