Energy Ideas

Started by Eppiox, March 15, 2015, 09:09:48 AM

Previous topic - Next topic

Eppiox

Short Question:
Is there a way to set power generation?

If Not?
I still need a bit of help, currently I've found two work arounds which are iffy:
1) Create an energy resource, then a siphon on it. (Player cannot see energy levels)
OR
2) Create a bunch of reactors overlapping for desired effect. (Player can see energy levels)
The new question is, how does one create a completed building (Currently it just starts constructing the unit).
Thanks for reading :D

warren

#1
"REACTOR" CurrentCoords CreateUnit ->unit
<-unit CONST_ISBUILDING FALSE SetUnitAttribute


If you create a powerzone first, then you need one tenth as many reactors. In addition, you can directly manipulate the energy levels of structures other than the commandnodes.

Edit:
Of particular note, guppies will not return to base if they keep getting more energy.

Eppiox

Guppies would work perfect for the effect I'm after, however is there a way to disable them being moveable/selectable yet still dispatch power?
I'm thinking at perhaps running abortmove or something on them constantly?

warren

#3
<-unit FALSE SetUnitSelectableOverride

Edit:
If you want to do this kind of thing, the GUPPYAIR needs the ammo modification, whereas it is the GUPPY that needs the selectability override.

Eppiox

Alas I tried with the GUPPYAIR, but the game locks up.  So it seems without placing a guppy base down first they won't work, but that means it won't send out packets.

Is there a way to place a landed guppy so it will distribute power?
Everything I've tried has not worked.

warren

#5
Here is probably how to do it: In the editor: create the guppy base. Move the GUPPYAIR off the guppy base. In a script move both offscreen using SetPixelCoords (but to different coordinates) and set the base to be unselectable. When you want the guppy to suddenly appear, move the GUPPYAIR back.

Edit:
I mean: <-unit CONST_PIXELCOORDX -1000 SetUnitAttribute

Eppiox

Ah well after some testing, I just can't get this to work, I can move the Guppy and the GuppyAir to where ever I like yet the guppyAir will only ever release packets if it is manually landed or goes through that landing off the base phase, which means simply moving the base and guppyAir does not work :(

The other idea I had was to place the guppies in the map editor and select them but.. since there are going to be about 24 of them I'd rather not.


warren

#7
That is a lot of guppies. Unfortunately, the only way I know how to make guppies work is to manually move them off the base the first time. Have you considered creating a field that auto charges weapons in range?

Edit:
OR, move the guppies off the base then save and load.