Stockpiling Emitter

Started by Flash1225, June 27, 2014, 10:20:14 PM

Previous topic - Next topic

Flash1225

Aka the Volcano Emitter, this little bugger has an interesting surprise in store for the player:
It doesn't do anything at first, just sits there. However, when a player's unit gets within x range (where x is the required distance for the emitter to activate), preferably within a nullifier's range when it's not on a PZ, the emitter will release a high amount of creeper (at least 75)that it "stockpiled",and begin producing c amount of with creeper d amount of time between each time. Should the unit that activated the emitter be destroyed or moved away, the emitter will continue to release c creeper. 1 minute after activation, though, if the emitter hasn't been destroyed, it will stop producing creeper and stockpile creeper again, and the process starts over.

I don't have the script, just an idea for it. If anyone wants to respond and give me their script for this, feel free. If you can't find a way to create a good script, that's okay.
Considering how many turns my life has taken (good and bad), I'm still fairly neutral to it all. I take the hits, I don't react overly.

ParkourPenguin

Here's a little script I made in a few minutes. It has room for improvement, but I believe it does what you asked of it to do. I also didn't set any default unit attributes, but if you want to, feel free to by invoking SetUnitAttribute (http://knucklecracker.com/wiki/doku.php?id=crpl:docs:setunitattribute) somewhere in the once...endonce block.

If anyone wants to use this for any purpose, feel free to. If you encounter any bugs, glitches, or anything else unintended, let me know, and I will attempt to update the script as soon as possible.
"Only a life lived for others is a life worthwhile."
-Albert Einstein

Grayzzur

Hey, someone posted something while I was debugging my script. I'll throw this up there anyway, plus a map file to play with it.

"Fate. It protects fools, little children, and ships named 'Enterprise.'" -William T. Riker