Knuckle Cracker

Creeper World 3 => The Coder's Corner => Topic started by: GoodMorning on October 31, 2017, 04:33:55 AM

Title: Spot the foolish mistake...
Post by: GoodMorning on October 31, 2017, 04:33:55 AM
Hello all.

I've made an error in this script, somewhere.

Intended behaviour (for debugging):
Unit is normally a custom Emitter.
When hit by a Nullifier, should trace "OOF".

Actual behaviour:
Kaboom, PZ left, :destroyed called, and so on.

So, it seems that I have made an error when setting CONST_DESTROYONDAMAGE. But I can't seem to find it, and the nearby trace statement runs.

(Final script is intended to launch "spores" to reproduce, hence "Shroom" as the name.)
Title: Re: Spot the foolish mistake...
Post by: planetfall on October 31, 2017, 07:09:32 AM
You need to set CONST_NULLIFIERDAMAGEAMT to 1.
Title: Re: Spot the foolish mistake...
Post by: GoodMorning on October 31, 2017, 04:44:40 PM
Why? Is that not the default?

To be clear: The issue is that the Core is being destroyed when it should not.

So setting the Nullifier damage amount seems futile, given that the core is supposed not to be destroyed on damage.
Title: Re: Spot the foolish mistake...
Post by: Sorrontis on October 31, 2017, 05:43:46 PM
make sure it's written
<-uid Const_??? value setunitattribute

if you have it this way
<-uid value const_??? setunitattribute

it wipes the unit away. had that problem yesterday.
Title: Re: Spot the foolish mistake...
Post by: GoodMorning on October 31, 2017, 06:07:50 PM
I've checked that. :)
Title: Re: Spot the foolish mistake...
Post by: GoodMorning on October 31, 2017, 11:02:59 PM
Time to eat a delicious pile of words...

Setting the Nullifier damage amount worked. This leaves me still asking "Why?"