Knuckle Cracker

Creeper World 3 => The Coder's Corner => Topic started by: Builder17 on October 09, 2015, 06:49:59 AM

Title: Why runners stun AC emitters?
Post by: Builder17 on October 09, 2015, 06:49:59 AM
Title tells all.  :)
Title: Re: Why runners stun AC emitters?
Post by: driesemol on October 09, 2015, 08:51:39 AM
This doesn't really have something to do with CRPL, but I'll give you the answer anyway :)

The loki adjusted the tech (as told in the story), it doesn't hinder the creeper, but anything else including AC-emitters as they aren't beneficial to the creeper.

You should be able to write a script for an AC emitter that can't be targetted by runners though
Title: Re: Why runners stun AC emitters?
Post by: Builder17 on October 09, 2015, 01:23:11 PM
Nice you give answer anyways.  :)
Spoiler
I will try it.
[close]
Title: Re: Why runners stun AC emitters?
Post by: Grayzzur on October 09, 2015, 02:43:42 PM
While EMITTER and ANTIEMITTER are two different units in the game and runners will stun ANTIEMITTERs, and in the editor dialogs you can't set an EMITTER's Emit Amt below zero and you can't set an ANTIEMITTER's Emit Amt above zero...

you CAN change them via CRPL with SetScriptVar.

Sets an emitter to -2, producing 2 AC at its normal interval:
<<emitterUnitID>> 0 "PRODUCTIONAMOUNT" -2000000 SetScriptVar
Same works with positive values on anti-emitters, you can have creeper-producing stunnable emitters.

I haven't tried it, but I would guess one possible side effect with victory conditions is that you'd need to destroy all EMITTER units and not the ANTIEMITTER units, regardless of what they actually produce. That could become confusing.