Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Doing 10 Damage to a Random Building
Doing 10 Damage to a Random Building
Sep 10 2008, 11:13 pm
By: Madroc  

Sep 10 2008, 11:13 pm Madroc Post #1



So what I want to do is this:

When a player's vHP unit is destroyed, it deals 10 damage to one RANDOM building in his base.
I see 2wo options for doing this:

1. There is a trigger that is like this:


[*]All Players

[*]Current Player has at most 20 deaths of Randomization

[*]Add one death of Randomization for current player
[*]Preserve Trigger

And a trigger like this:


[*]All Players

[*]Current Player has exactly 20 deaths of Randomization

[*]Set to 1 death of Randomization for current player
[*]Preserve Trigger


Then when the vHP unit is killed, all buildings inside your base are given to Player 8 (who is allied with the player who is about to get hurt). Then if the player has at least one death count, a death count is subtracted from that player and the building farthest to the left is given BACK to the player who is about to get hurt. If at any time during this player 8 has no buildings left but there are still death counts unaccounted for, all buildings are given to player 8 again. Once the player runs out of death counts, a location is moved to the building farthest left in his base, all building in his base are given to back to the player, and an enemy zergling is spawned next to the building to deal 10 damage to it.

That is the 1irst option.

The 2econd option I see is this:
Again the 2 triggers that I showed above for the 1irst option are used to randomize a death count. This time, there is an observer owned by Player 8 that is created over every building that is built in the player's base. If he is hit, it makes all the observers become owned by the player that is getting hurt, then it cycles through them much like in the 1irst option I gave, and when all the death counts are used up, it creates a zergling at the left-most observer.

The problem with the first option is that when you get hit, all of your buildings are de-selected. When under constant fire, sometimes you will get hit (at most) every 1/3 of a second, which means that selecting things and creating units from them (which makes explosions and stuff sometimes) is just about impossible. Also it will be really frustrating to be about to click something and then it gets de-selected for apparently no reason.

The problems with the second problem is that having observers over all your buildings is pretty ugly and that if your building is in the air, moving, there is a huge possibility that your observer will move over to a different building on accident.

If I had no other options, I would use the second option I gave and just take out the ability to lift (Kill them when they lift off).

Can anybody think of a better way to deal 10 damage to a random building?



None.

Sep 11 2008, 1:14 am NudeRaider Post #2

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

2 ideas:
- Use burrowed lings instead of Observers

- Let an Observer for P12 (no1 has vision to P12) patrol above the buildings. You can use junkyard dog, or a preset patrol path or random paths between preset waypoints. Thats up to you. When he got hit, set a switch or something, and wait until the obs is above a building (location followin obs), then create the damaging zergling there.

If those aren't to your liking (reason pls!) I might think of more...




Sep 11 2008, 3:14 am Madroc Post #3



Your first idea - I am not sure if this would work; if it got created next to like a nexus or something like that, wouldn't it prevent another building from being built right next to that building cuz the zergling would be in the way? If not, then that is my favorite idea.

Your second idea - The way you describe it is that it waits until the observer gets somewhere and then triggers a lot on that one single building until the observer goes away, so that one building would get slammed. The alternative would be to wait until the observer gets to another building before it triggers again, but that would suck also because it would take so long and during a combat, it would take too long of a time to deal out the damage to the player's base.

So I'm not sure if the first idea works and the second idea is a worse compromise than my 2nd solution. Have any other ideas? Thanks for the interest, btw.

And are you saying that even if you have a missile turret present you can't see the P12 observer?



None.

Sep 11 2008, 3:21 am rockz Post #4

ᴄʜᴇᴇsᴇ ɪᴛ!

no, you can detect p12 obs. You're going to have to use air, but you can easily just center one air unit over a building, give that building to p8, then give it back. There's no reason to give ALL the buildings away.

Also, if you're getting hit, wouldn't it be difficult to build something?



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Sep 11 2008, 3:33 am Madroc Post #5



Quote from rockz
no, you can detect p12 obs.
OK, that's what I thought..
Quote
You're going to have to use air, but you can easily just center one air unit over a building, give that building to p8, then give it back. There's no reason to give ALL the buildings away.

Wait, be more specific I don't know what you are talking about.

Quote
Also, if you're getting hit, wouldn't it be difficult to build something?

I don't understand, could you be a little more specific plz?



None.

Sep 11 2008, 4:41 am NudeRaider Post #6

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

I just gave a short description of my ideas, no complete trigger sets. Ofc you'll have to clear the switch as soon as the trigger fired first.
You say it takes too long. What's the max time the process may need? Because clever patrol paths and/or multiple obs/wraith/Tom by P8-12 could speed it up significantly, As your ship area isnt too big.

After creating the zerglings you have to center them on the building. Could be a little tricky to always find the right one, but it should be possible.




Sep 11 2008, 5:23 am Oyen Post #7



IRC, burrowed units can be moved under buildings, unseen by anyone. So NudeRaider's zergling idea would work well.



None.

Sep 11 2008, 5:57 am Madroc Post #8



Quote from NudeRaider
I just gave a short description of my ideas, no complete trigger sets. Ofc you'll have to clear the switch as soon as the trigger fired first.
You say it takes too long. What's the max time the process may need?
I'd like for it to be able to trigger once a second if possible. The process you said could take around 3-5 seconds if there is a decent-sized gap (this is pretty common if it is early in the game).
Quote
Because clever patrol paths and/or multiple obs/wraith/Tom by P8-12 could speed it up significantly, As your ship area isnt too big.

Wow I hadn't thought of that! That makes this way of doing it pretty viable! The only bad part is that it would be pretty ugly having 4 blobs (or actual observers if you have a detector, which zerg for one will ALWAYS have). I'd say that it is more ugly than the other solution where you have an observer over every building and then you just cycle through that, but that solution is not that great because I would have to disable lifting off. I don't know which one I'd rather use. I"ll think about it.

Can you think of any more solutions?

Quote
After creating the zerglings you have to center them on the building. Could be a little tricky to always find the right one, but it should be possible.

Quote from Oyen
IRC, burrowed units can be moved under buildings, unseen by anyone. So NudeRaider's zergling idea would work well.

Ummmm..
I don't believe you... How do you do it?



None.

Sep 11 2008, 9:35 am NudeRaider Post #9

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

Quote from Madroc
Quote
After creating the zerglings you have to center them on the building. Could be a little tricky to always find the right one, but it should be possible.
Quote from Oyen
IRC, burrowed units can be moved under buildings, unseen by anyone. So NudeRaider's zergling idea would work well.
Ummmm..
I don't believe you... How do you do it?
Yes, lings can be centered under buildings.
You would have to keep track on how many buildings he had and how many he has this trigger loop. That means a lot of triggers like "IF Current Player has exactly 5 buildings, THEN set dc to 5" Then use binary countoff to compare with the dc of the last trigger loop. If you detect he has built one, then use a cycling system to find the one without a ling underneath. => deselect, but as you probably just had your worker selected this might not be so bad.

Quote from Madroc
Wow I hadn't thought of that! Can you think of any more solutions?
Yeah, I am quite inventive when it's about how to do certain things you won't find in the book (aka wiki). ^^
Here's the other idea I promised if you don't like the other ones:
Create a guardian, instead of a ling, in the middle of the ship and let the guardian choose. :omfg:
If your ship is bigger than twice the range of a guard you can make 2 locations and randomly choose one for the guard to be created.

If you don't have units (move worker first!) or turrets and alike around then this could be your best option. It's simple, yet effective.
I'm not sure about the attack priority. The guardian might end up always targeting certain building types. But as for the RPG aspect you could pretend those are the systems closest to the hull / most vulnerable (IF the guard prioritizes at all).




Sep 11 2008, 5:37 pm Madroc Post #10



Quote from NudeRaider
Quote from Madroc
Quote
After creating the zerglings you have to center them on the building. Could be a little tricky to always find the right one, but it should be possible.
Quote from Oyen
IRC, burrowed units can be moved under buildings, unseen by anyone. So NudeRaider's zergling idea would work well.
Ummmm..
I don't believe you... How do you do it?
Yes, lings can be centered under buildings.
Wow, sorry Oyen, :crazy: I just didn't think it was possible. If fact you just gave me my solution, thanks.
Quote
You would have to keep track on how many buildings he had and how many he has this trigger loop. That means a lot of triggers like "IF Current Player has exactly 5 buildings, THEN set dc to 5" Then use binary countoff to compare with the dc of the last trigger loop. If you detect he has built one, then use a cycling system to find the one without a ling underneath. => deselect, but as you probably just had your worker selected this might not be so bad.
Yup, I know how. Yes, unfortunately it will require a lot of triggers, you're right.

Quote
Quote from Madroc
Wow I hadn't thought of that! Can you think of any more solutions?
Yeah, I am quite inventive when it's about how to do certain things you won't find in the book (aka wiki). ^^
Spoken like a pro. :rolleyes:
Quote
Here's the other idea I promised if you don't like the other ones:
Create a guardian, instead of a ling, in the middle of the ship and let the guardian choose. :omfg:
If your ship is bigger than twice the range of a guard you can make 2 locations and randomly choose one for the guard to be created.
I tested it out and unfortunately the guardian always attacks the turret first followed by the closest building. Too bad, that would have been a cool system.

So I'll use the observer solution I originally stated except replace those observers with burrowed units.



None.

Sep 11 2008, 8:45 pm Craftstar2 Post #11



Why not have a Junk Yard dogged obsever and when ur VHP unit dies, move an infested terran to the obsever? Simple.



None.

Sep 11 2008, 11:01 pm NudeRaider Post #12

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

Junkyard dog doesn't work well in small locations. Also if those ship templates aren't near the center (which is very likely) the buildings at the side of the ship pointing towards the map center would be favored.

Quote from Madroc
I tested it out and unfortunately the guardian always attacks the turret first followed by the closest building. Too bad, that would have been a cool system.
There's no way to replace the turret? Wait ... you don't have to replace turrets, you can just make them invincible for the duration of the damaging. And if turrets are to be hit too sometimes make a 2nd trigger that leaves the turrets vincible, but only fires randomly 10% of the time.

Because IMO it wouldn't be a bad thing if the guard attacked the closest building. That behavior would simulate the effect that systems closer to the outer hull are hit first. So you can build critical systems farther away from the middle.

If you don't agree you can still choose a few spots where 3 or 4 buildings intersect (aka in the middle of them) and randomly select one of the locations to create the guardian.




Sep 12 2008, 2:45 am Madroc Post #13



Yeah I thought about that when I did my last post... Upon more thinking both the idea of the guardian(s) and the burrowed zerglings are almost equally attractive. Either would work fine.

After a lot of thinking I decided that the burrowed zerglings under buildings was SLIGHTLY in favor because of this:
1. Imagine you chose a zerg hero or protoss hero. Wouldn't it be more frustrating to wait for one (or 4 in the case of your last paragraph from the previous post) buildings to recharge shields/health than to wait for all of your buildings to recharge? (Yes I'd like for the waiting to recharge to be a small required part of the map, which means the ghost (actually it will end up being a cloaked wraith) won't really do 10 damage, maybe 100)

Yeah I know it's not that great of a reason, but in my opinion it JUST pushes it over the fence. I think looking at maps from a Freudian perspective is very important for the success of the map, ya know? (just FYI I think I pushed it over the edge with my Rifle map but still)



None.

Sep 12 2008, 9:13 am NudeRaider Post #14

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

My point was that when you create the guard in the middle of 4 buildings it (hopefully) wouldn't always attack the same.

Another idea I had when I wrote was the last post was making a random number of buildings invincible, create the guard and then it won't always attack the same, although some buildings are still being favored I guess.

And I won't spare you another idea as I think it'll be THE best solution:
Create a random number of guards for the player that is about to be damaged. Then create 1 guard for the player that is doing the damage, and remove all other guards. The creation pattern is a spiral, so the place where the guard will turn out to be is be very random.




Sep 13 2008, 7:28 am Madroc Post #15



Oh man, that's good. I agree, that's the best solution. And then we could also include flying buildings this way (if there is a building in range, there is a one in (4?) chance that the guardian will become a corsair instead. (Unfortunately that would be one more variable that must be the same for the hero and something else but that is OK)).

To prevent turrets from being favored, there is a 1 in 8 chance that all the turrets in a player's base will NOT become invincible. Sounds good?

Also for rectangular ships (the battlecrusier and carrier), there could be two possible locations for the guardians to appear.

Also the randomized number could be something big like 20; that way the outer buildings are more likely to get hit. Makes sense eh? :)

Sheesh man, why didn't you post this idea before? :) Great idea I'll use it. Gets rid of a HECK of a lot of triggers needing to be created too. :P I think that it will be a cool effect, as well.

Unfortunately the dropship that the players receive could be exploited by placing it over more fragile/valuable buildings if they know about the system. :(

Edit I forgot to say thank you so much you helped this map immensely!!



None.

Sep 13 2008, 9:23 am NudeRaider Post #16

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

Quote from Madroc
Oh man, that's good. I agree, that's the best solution. And then we could also include flying buildings this way (if there is a building in range, there is a one in (4?) chance that the guardian will become a corsair instead. (Unfortunately that would be one more variable that must be the same for the hero and something else but that is OK)).
You should create a devourer instead of cors because its literally impossible to time the removal to be ALWAYS after the cors' first shot. Or, if you want to punish lifters, take a muta; 3 buildings damaged :D

Quote from Madroc
Great idea I'll use it. Gets rid of a HECK of a lot of triggers needing to be created too. :P I think that it will be a cool effect, as well.
To prevent turrets from being favored, there is a 1 in 8 chance that all the turrets in a player's base will NOT become invincible. Also for rectangular ships (the battlecrusier and carrier), there could be two possible locations for the guardians to appear.
Also the randomized number could be something big like 20; that way the outer buildings are more likely to get hit. Makes sense eh? :)
Sounds good?
Yup

Quote from Madroc
Sheesh man, why didn't you post this idea before? :)
Because I haven't had it before, I had to think myself into the problem step by step. With your precise descriptions of what you want, and what the problems with the various solutions are you helped a great deal in finding the solution.

Quote from Madroc
Unfortunately the dropship that the players receive could be exploited by placing it over more fragile/valuable buildings if they know about the system. :(
Center on the dropship, move it to a temp location, and after the creation move it back.

Quote from Madroc
Edit I forgot to say thank you so much you helped this map immensely!!
np. Glad we found a satisfactory solution.




Sep 13 2008, 6:43 pm Madroc Post #17



Quote from NudeRaider
You should create a devourer instead of cors because its literally impossible to time the removal to be ALWAYS after the cors' first shot. Or, if you want to punish lifters, take a muta; 3 buildings damaged :D

Yes, you are right. :)

Quote
Center on the dropship, move it to a temp location, and after the creation move it back.

Right, I thought of that. I just thought that it would kind of suck if you were being fired really bad upon and you were trying to get the scv over there to repair the building with the dropship, ya know?



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
[2024-4-20. : 7:56 pm]
Oh_Man -- lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
Please log in to shout.


Members Online: MetalGear