Field projector

Started by planetfall, June 05, 2016, 08:51:34 PM

Previous topic - Next topic

planetfall

I am trying to create a unit which spawns a set of fields. The front of the device will repel creeper and AC in an arc, and the rear will also repel AC while sucking creeper in. To keep things interesting it will also fire invisible creeper-attracting ac-repelling cores in front of it, but I've solved that already. The trouble lies with deploying the main field, as there's no good field visualizer in cw3 so I can see what's going on and invariably wrong. I've attached my progress so far, maybe someone can make sense of it. Any help is greatly appreciated.

(This all came about due to my need to fill time during ritual procrastination, so... yes.)
Pretty sure I'm supposed to be banned, someone might want to get on that.

Quote from: GoodMorning on December 01, 2016, 05:58:30 PM"Build a ladder to the moon" is simple as a sentence, but actually doing it is not.

GoodMorning

There's a section on "interesting" CRPL fields in the Sleeper template for Shields, and possibly elsewhere. SetFieldCell, and :awake will be your friends.

There's some issue, I seem to recall, with getting C and AC to react differently. I haven't worked with fields much, and even less successfully, but that might help.
A narrative is a lightly-marked path to another reality.

planetfall

All right, I found my errors. It was a bit of code-rustiness combined with inconsistency in CRPL (fields are one of the cases where Y comes first, and I had barely used fields before so was not used to this quirk.) The invisible projectiles, which use EnableTowerField, are a bit of a problem. Rather than repulse AC and attract C (or the inverse if $FieldStrength is negative) they either attract both if positive or repulse both if negative. I wonder if that's a bug in EnableTowerField or if I was just a derp again.
Pretty sure I'm supposed to be banned, someone might want to get on that.

Quote from: GoodMorning on December 01, 2016, 05:58:30 PM"Build a ladder to the moon" is simple as a sentence, but actually doing it is not.

GoodMorning

It's a quirk of EnableTowerField. The wiki page states that they are affected in the same way, no matter what you say to do with AC.
A narrative is a lightly-marked path to another reality.

planetfall

Bummer. Well, I guess they'll attract only. There are enough of them on the map at once that I don't want the overhead from manually setting all those cells each frame.
Pretty sure I'm supposed to be banned, someone might want to get on that.

Quote from: GoodMorning on December 01, 2016, 05:58:30 PM"Build a ladder to the moon" is simple as a sentence, but actually doing it is not.