Knuckle Cracker

Creeper World 3 => The Coder's Corner => Topic started by: stewbasic on June 04, 2014, 11:44:22 AM

Title: SetDigitalisGrowth not forming connection
Post by: stewbasic on June 04, 2014, 11:44:22 AM
I'm using SetDigitalisGrowth to lay down ungrown digitalis. In some cases although it is adjacent to grown and seeded digitalis, it doesn't grow. See the attached map for an example.

The following fix the problem:
* Replacing the digitalis using "+Digi" in edit mode (even without removing it first)
* Resetting the digitalis using the "Delete Digitalis" button in edit mode.
The following do not:
* Save/load
* Cutting the digitalis off and letting it regrow.
* Removing the emitter, letting the digitalis die, and then replacing it.

I played around a bit but couldn't see a simple set of conditions to determine when the bug occurs.
Title: Re: SetDigitalisGrowth not forming connection
Post by: stewbasic on June 04, 2014, 08:07:17 PM
Possibly related: If I use SetDigitalis(x y 0) to kill digitalis (but leave the growth), that also seems to prevent the digitalis from regrowing there.
Title: Re: SetDigitalisGrowth not forming connection
Post by: planetfall on June 04, 2014, 08:45:26 PM
Quote from: stewbasic on June 04, 2014, 08:07:17 PM
Possibly related: If I use SetDigitalis(x y 0) to kill digitalis (but leave the growth), that also seems to prevent the digitalis from regrowing there.

Hmm. I used SetDigitalis(x y -1) in a few maps and that seemed to work.
Title: Re: SetDigitalisGrowth not forming connection
Post by: Annonymus on June 05, 2014, 12:31:30 PM
What happens if you put some digitalis on top of the growth and remove it immediatly?
Title: Re: SetDigitalisGrowth not forming connection
Post by: stewbasic on June 05, 2014, 07:19:10 PM
Quote from: Annonymus on June 05, 2014, 12:31:30 PM
What happens if you put some digitalis on top of the growth and remove it immediatly?
This seems to work; I'll use this workaround for now:

SetDigitalisGrowth(dup2 TRUE)
SetDigitalis(dup2 0.1)
SetDigitalis(-1)

Title: Re: SetDigitalisGrowth not forming connection
Post by: GoodMorning on June 12, 2017, 07:47:47 AM
For those who find this when searching - SetDigitalis to 0 is intended to prevent growth, staying at 0 forever. SetDigitalis to -1 is the standard way to kill it. Somewhere, V explained about this (internal array, negatives=ungrown). The wiki page for SetDigitalis has been updated.