Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: How do you make allied buildings unrepairable?
How do you make allied buildings unrepairable?
Nov 20 2014, 7:48 pm
By: Zoan  

Nov 20 2014, 7:48 pm Zoan Post #1

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.



\:rip\:ooooo\:wob\:ooooo \:angel\: ooooo\:wob\:ooooo\:rip\:

Nov 20 2014, 8:51 pm Roy Post #2

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.)




Nov 21 2014, 2:34 am Zoan Post #3

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?



\:rip\:ooooo\:wob\:ooooo \:angel\: ooooo\:wob\:ooooo\:rip\:

Nov 21 2014, 3:18 am Azrael Post #4



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.




Nov 21 2014, 6:05 am NudeRaider Post #5

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!"




Nov 24 2014, 2:59 am rockz Post #6

ᴄʜᴇᴇsᴇ ɪᴛ!

http://www.staredit.net/starcraft/Regeneration

You 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?"

Dec 2 2014, 7:17 pm Zoan Post #7

Math + Physics + StarCraft = Zoan

Quote from rockz
http://www.staredit.net/starcraft/Regeneration

You 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 :D



\:rip\:ooooo\:wob\:ooooo \:angel\: ooooo\:wob\:ooooo\:rip\:

Dec 4 2014, 5:06 am rockz Post #8

ᴄʜᴇᴇsᴇ ɪᴛ!

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?"

Dec 4 2014, 5:30 am Zoan Post #9

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 :O



\:rip\:ooooo\:wob\:ooooo \:angel\: ooooo\:wob\:ooooo\:rip\:

Dec 5 2014, 3:19 am rockz Post #10

ᴄʜᴇᴇsᴇ ɪᴛ!

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?"

Dec 5 2014, 4:51 pm Zoan Post #11

Math + Physics + StarCraft = Zoan

oh, right lol. that clearly wasn't 9 seconds haha :D
Thanks again btw



\:rip\:ooooo\:wob\:ooooo \:angel\: ooooo\:wob\:ooooo\:rip\:

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:41 am]
v9bettel -- Nice
[01:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
Please log in to shout.


Members Online: jun3hong, eksxo