Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Unwanted Unfinished Building Detection
Unwanted Unfinished Building Detection
Aug 30 2008, 5:34 am
By: StrikerX22  

Aug 30 2008, 5:34 am StrikerX22 Post #1



I'm building a quirky ums melee with a different tech tree and (at least for now) fairly normal stats for most units. For the Zerg, I replace some buildings the first time they're built with another.

Building A becomes building B the first time A is built. 2nd time A is built, it stays A. (extra info: if A exists, and at most 1 B, then if you build another A, it'll become B.)

The problem that occurs is this:
Building type A #1 starts building...
Building A #2 starts building to the left of #1.
Building A finishes first as it should, but causes #2 to become building B instead of itself, even though #2 isn't finished yet.

The issue being apparently bring (and I assume command) doesn't detect partially built buildings, but center location and remove do. I'm not sure how to stop this from happening... nothing's coming to mind that would work. Any Ideas? Thanks.



None.

Aug 30 2008, 5:44 am Madroc Post #2



Hm I understand your predicament.

Does giving units to players cause in-progress buildings to be given as well?



None.

Aug 30 2008, 5:49 am StrikerX22 Post #3



erm, i think so... haven't tried it yet, but I thought I've heard that if you give an incomplete to a neutral player, it doesn't complete.. or wait, is that a p9+ thing? i'm confused - -. I'll prolly try it shortly.



None.

Aug 30 2008, 5:52 am Madroc Post #4



Yeah try it out and if it DOESNT give them then you could simply give all "barracks" or whatever all the time to player something or other... Actually that mightn't work. Sorry I'm a little too tired to figure it out right now. I think you could.

Wow it actually recognizes mightn't as a real word.



None.

Aug 30 2008, 6:16 am StrikerX22 Post #5



It DOES give them (if they're not neutral at least... i want triggers to work for player 8 comp), but I think I might be able to figure it out from here just by splitting the trigger up... I'll edit post the results.

Edit: Okay, I got it to work, tho it still has a bug I have to work out. Here are the triggers, for the heck of it. I once again was mysteriously kept from being online yesterday, so we'll see how that goes.

//-----------------------------------------------------------------//

Trigger("Players(in Alternate Reality)"){
Conditions:
Bring("Current Player", "Zerg Spawning Pool", "Anywhere", At least, 1);
Bring("Current Player", "Zerg Spire", "Anywhere", Exactly, 0);
Bring("Current Player", "Zerg Greater Spire", "Anywhere", Exactly, 0);
Bring("Current Player", "Zerg Hive", "Anywhere", Exactly, 0);
Deaths("Current Player", "Zerg Spawning Pool", Exactly, 0);
Deaths("Current Player", "Zerg Spire", Exactly, 0);
Deaths("Current Player", "Zerg Greater Spire", Exactly, 0);

Actions:
Set Deaths("Current Player", "Zerg Spawning Pool", Add, 1000);
Move Location("Current Player", "Zerg Spawning Pool", "Anywhere", "Medium Size Tech");
Move Location("Current Player", "Zerg Spawning Pool", "Anywhere", "1x1");
Give Units to Player("Current Player", "Player 8", "Zerg Spawning Pool", 1, "Anywhere");
Comment("Spawn = Spire");
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Players(in Alternate Reality)"){
Conditions:
Bring("Current Player", "Zerg Spawning Pool", "Anywhere", Exactly, 0);
Bring("Current Player", "Zerg Spire", "Anywhere", Exactly, 0);
Bring("Current Player", "Zerg Greater Spire", "Anywhere", Exactly, 0);
Deaths("Current Player", "Zerg Spire", Exactly, 0);
Deaths("Current Player", "Zerg Greater Spire", Exactly, 0);
Deaths("Current Player", "Zerg Spawning Pool", At least, 1000);

Actions:
Set Deaths("Current Player", "Zerg Spawning Pool", Subtract, 1000);
Give Units to Player("Player 8", "Current Player", "Zerg Spawning Pool", 1, "1x1");
Remove Unit At Location("All players", "Zerg Spawning Pool", 1, "1x1");
; Kill Unit At Location("All players", "Men", All, "Medium Size Tech");
Remove Unit At Location("All players", "Men", All, "Medium Size Tech");
Create Unit("Current Player", "Zerg Spire", 1, "Medium Size Tech");
Comment("Spawn = Spire");
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Players(in Alternate Reality)"){
Conditions:
Bring("Current Player", "Zerg Spawning Pool", "Anywhere", At least, 1);
Bring("Current Player", "Zerg Spire", "Anywhere", Exactly, 0);
Bring("Current Player", "Zerg Greater Spire", "Anywhere", Exactly, 0);
Deaths("Current Player", "Zerg Spire", Exactly, 0);
Deaths("Current Player", "Zerg Greater Spire", Exactly, 0);
Deaths("Current Player", "Zerg Spawning Pool", At least, 1000);

Actions:
Move Location("Current Player", "Zerg Spawning Pool", "Anywhere", "Medium Size Tech");
Remove Unit At Location("Current Player", "Zerg Spawning Pool", 1, "Medium Size Tech");
; Kill Unit At Location("All players", "Men", All, "Medium Size Tech");
Remove Unit At Location("All players", "Men", All, "Medium Size Tech");
Create Unit("Current Player", "Zerg Spire", 1, "Medium Size Tech");
Set Deaths("Current Player", "Zerg Spawning Pool", Subtract, 1000);
Give Units to Player("Player 8", "Current Player", "Zerg Spawning Pool", 1, "1x1");
Comment("Spawn = Spire");
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Players(in Alternate Reality)"){
Conditions:
Bring("Current Player", "Zerg Spawning Pool", "Anywhere", At least, 2);
Bring("Current Player", "Zerg Spire", "Anywhere", At most, 1);
Bring("Current Player", "Zerg Greater Spire", "Anywhere", At most, 1);

Actions:
Move Location("Current Player", "Zerg Spawning Pool", "Anywhere", "Medium Size Tech");
Remove Unit At Location("Current Player", "Zerg Spawning Pool", 1, "Medium Size Tech");
; Kill Unit At Location("All players", "Men", All, "Medium Size Tech");
Remove Unit At Location("All players", "Men", All, "Medium Size Tech");
Create Unit("Current Player", "Zerg Spire", 1, "Medium Size Tech");
Comment("Spawn = Spire");
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Players(in Alternate Reality)"){
Conditions:
Bring("Current Player", "Zerg Spawning Pool", "Anywhere", Exactly, 0);
Bring("Current Player", "Zerg Spire", "Anywhere", Exactly, 0);
Bring("Current Player", "Zerg Greater Spire", "Anywhere", Exactly, 0);
Deaths("Current Player", "Zerg Spawning Pool", At most, 999);

Actions:
Set Deaths("Current Player", "Zerg Spawning Pool", Set To, 0);
Set Deaths("Current Player", "Zerg Spire", Set To, 0);
Set Deaths("Current Player", "Zerg Greater Spire", Set To, 0);
Comment("Spawn = Spire");
Preserve Trigger();
}

Current bug: when you mutate to a greater spire, the mutation causes no complete spire or greater spire to "exist" for the bring condition. I'll have to work on that a while... I may just use a death counter indicator to track if a spire existed and if any have been killed or not; I just haven't had time since I found the bug. Thanks for the help, the give trigger does work fast enough, despite some weird aspect which I now conveniently forget that apparently requires a timer of some kind.

Yesterday, my internet was out for 11 hours yay. Go Qwest. Chances are they're working on lines or something, but of course they know nothing about it.

Post has been edited 1 time(s), last time on Aug 31 2008, 5:22 pm by StrikerX22.



None.

Aug 30 2008, 9: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

Well I got an idea about what you could do if giving the building has unwanted side affects.

Center on the building, then detect if its there (not in progress).
If finished -> do actions
If not, use a mobile grid to center a 1x? location right of the building. ? = vertical size of you map (e.g. 1x256 loc).
Then check for the building in the 1x? loc. Repeat this process until you reached the right map edge (detectable by a unique unit that is placed on the very right). By copying the mobile grid/detection triggers you can speed up the process.

This will still fail, if the buildings are created at about the same x coordinate.




Aug 31 2008, 5:25 pm StrikerX22 Post #7



Thanks, but yeah it'd have to always work, or there'd be pretty big exploits. The give trigger seems to work fine though, and I already had a computer player set aside for effects.

I'll keep working on the map and see if I can't get a thread in Map Production. The zerg are kinda fun to play with... terrans are pretty weird, but not a lot to them yet. the protoss I need some ideas > >...

Post updated with trigs up there.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[04:59 am]
zsnakezz -- >:)
[04:59 am]
zsnakezz -- :)
[04:58 am]
zsnakezz -- somebody gets it
[04:58 am]
zsnakezz -- and its not all just numbers in my file screen
[04:57 am]
zsnakezz -- thank you for your comment though, good to know some people out there tried my map out
[04:57 am]
zsnakezz -- just kidding
[04:57 am]
zsnakezz -- ultra you have any thought or notes on undead invasion?
[2024-5-31. : 2:36 pm]
Wing Zero -- Bop em
[2024-5-31. : 2:36 pm]
Wing Zero -- Mods
[2024-5-29. : 9:40 pm]
Ultraviolet -- :wob:
Please log in to shout.


Members Online: Oh_Man, O)FaRTy1billion[MM], Roy