Building EnergyMines on EnergySources

Started by Sorrontis, May 23, 2017, 12:48:33 AM

Previous topic - Next topic

Sorrontis

So, I want to make a script that after some time, all the energy sources that do not have a mine on them, suddenly have a built enemy mine.

I tried the || "EnergyMine" Coordinates-of-EnergySource CreateUnit ->Mine || method, but that doesn't seem to work. Am I missing something?
"If you want others to be happy, practice compassion. If you want to be happy, practice compassion."

GoodMorning

Well, multiple sources can be on the same spot, so I understand why that doesn't work - I don't know of a way to make a mine, though. They're so bound-up that I have wondered why they aren't one unit (with state changes).
A narrative is a lightly-marked path to another reality.

Sorrontis

Quote from: GoodMorning on May 23, 2017, 12:52:18 AM
Well, multiple sources can be on the same spot...

Good point.

The only thing I can think of right now is by spawning the perfect # of particles on the energy source to "built" the mines.
"If you want others to be happy, practice compassion. If you want to be happy, practice compassion."

GoodMorning

#3
That can fail if the mines were red and then destroyed recently (there's a delay before the next mine is attempted). So if you do that, you would (at the least) need to zero the maximum speed.
A narrative is a lightly-marked path to another reality.