Math + Physics + StarCraft = Zoan
I've tried making the buildings invincible, and that didn't work.
I've also tried disabling the doodad state of the buildings, and that didn't work.
Also, for clarity, what I'm trying to do is make it so that you can build a bunker anywhere and have it constantly be burning (it's supposed to be a bonfire in my map), and unrepairable, so that it dies after a bit. Also the building is immediately transferred over to a computer player when you build it, though I suppose it doesn't have to be.
An artist's depiction of an Extended Unit Death
If you disable vision with that computer, then if you disable doodad state after giving the building, it will look visible but will be unclickable and unrepairable by the player. (If you disable first and then give, the building will be invisible.)
Math + Physics + StarCraft = Zoan
That worked until I realised that players could build turrets (torches in my map) right next to them, and then see them
Is there any other way?
One way you could work around this is by allowing the player to build something other than a bunker, which is then replaced with a bunker instead. By giving bunkers an arbitrarily long build time, their repair time will become exceptionally long as well.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Not sure if it's going to work, but maybe constantly giving it between 2 players, one allied with the player, one enemy to the player, prevents interaction with it.
Otherwise you could just order the SCV away from the bunker when it comes too close and give a text display: "Ouch, that fire is hot!"
http://www.staredit.net/starcraft/RegenerationYou can set build time to be very fast (too fast) and the repair rate will be super slow. The reason is that if repair rate is >65535 (255.996 HP/frame) it will immediately loop around and become 1 (0.0039 HP/frame).
What you want to do is this:
roundup(.9 * 256*HP/Build Time) = 65536 (or any multiple of 65536).
So ideally, 2560 HP and build time of 1 will net a repair rate of 1 (zerg regen is at 4).
If you don't mind seeing 285/284 as a HP bar you can also use 284 HP and put a 113 in the extra precision box. If you put 112 in, it will repair very quickly.
A side effect of this is that the HP will almost always be ~10% of the max when you build it, so it will die fairly quickly. Using a 285 HP bunker means that it will have 28 HP when it comes out and die in about 15 seconds. You can actively "tend" the fire by repairing it and it will die in 16 seconds.
How long do you want the fire to last, how long do you want it to take to build, and how much HP do you want it to have (or does that matter? I recommend setting invincibility on the fire). I'll tell you the correct build time/HP combination.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
Math + Physics + StarCraft = Zoan
http://www.staredit.net/starcraft/RegenerationYou can set build time to be very fast (too fast) and the repair rate will be super slow. The reason is that if repair rate is >65535 (255.996 HP/frame) it will immediately loop around and become 1 (0.0039 HP/frame).
What you want to do is this:
roundup(.9 * 256*HP/Build Time) = 65536 (or any multiple of 65536).
So ideally, 2560 HP and build time of 1 will net a repair rate of 1 (zerg regen is at 4).
If you don't mind seeing 285/284 as a HP bar you can also use 284 HP and put a 113 in the extra precision box. If you put 112 in, it will repair very quickly.
A side effect of this is that the HP will almost always be ~10% of the max when you build it, so it will die fairly quickly. Using a 285 HP bunker means that it will have 28 HP when it comes out and die in about 15 seconds. You can actively "tend" the fire by repairing it and it will die in 16 seconds.
How long do you want the fire to last, how long do you want it to take to build, and how much HP do you want it to have (or does that matter? I recommend setting invincibility on the fire). I'll tell you the correct build time/HP combination.
Hey, thanks a ton for this! I just set the hp to 2560 and build time to 9 seconds, and then once it was built set the hp to 6% and gave it to neutral. Works great
Did that solve the issue of repairing? The repair rate for 9 seconds should be 17/256 HP/frame. If you repair, it will slow the burning building down to -3/256 hp/frame, so it will always die, but much much slower.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
Math + Physics + StarCraft = Zoan
I got (.9*256*(2560/9)) = 65536 > 65535, so it loops back around to 1, the lowest repair rate. Did I do it wrong? It seems to work fine, and when I ordered a bunch of SCV's to repair the thing it's health didn't go up
Oh looks like I made a mistake. You're right, but 9 isn't in seconds, it's in frames.
15 frames = 1 second build time IIRC. If not, I know for a fact that 16 frames = 1 in game second, so it may be 16.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
Math + Physics + StarCraft = Zoan
oh, right lol. that clearly wasn't 9 seconds haha
Thanks again btw