Staredit Newtork
Community
StarCraft
Games
Site
Favourites
Unwanted Unfinished Building Detection, not sure how to get around it.

Creator: StrikerX22
Time: Aug 30 2008, 5:34 am

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

[Avatar]
eight archons burning...
 offline contact
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.
"If trees could scream, would we be so cavalier about cutting them down? We might, if they screamed all the time, for no good reason." - Jack Handey
Top

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

[Avatar]
Inside of a Battlecruiser!!
 online contact
Hm I understand your predicament.

Does giving units to players cause in-progress buildings to be given as well?
() )) (CRAYOLA) )) >
Jump in the crayon box and copy/paste this into your signature! You must make it a different color tho.
(signature image)
Build-A-Ship Workshop
Top

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

[Avatar]
eight archons burning...
 offline contact
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.
"If trees could scream, would we be so cavalier about cutting them down? We might, if they screamed all the time, for no good reason." - Jack Handey
Top

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

[Avatar]
Inside of a Battlecruiser!!
 online contact
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.
() )) (CRAYOLA) )) >
Jump in the crayon box and copy/paste this into your signature! You must make it a different color tho.
(signature image)
Build-A-Ship Workshop
Top

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

[Avatar]
eight archons burning...
 offline contact
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.
This post was edited 1 time, last edit by StrikerX22: Aug 31 2008, 5:22 pm.
"If trees could scream, would we be so cavalier about cutting them down? We might, if they screamed all the time, for no good reason." - Jack Handey
Top

Post #6     NudeRaider Aug 30 2008, 9:41 am

[Avatar]
Write your own destiny, or else someone will write it for you!
 online contact
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.
(signature image)
http://sonsofwar.pyrom.net/index.html___0% (user posted image) 100%
Top

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

[Avatar]
eight archons burning...
 offline contact
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.
"If trees could scream, would we be so cavalier about cutting them down? We might, if they screamed all the time, for no good reason." - Jack Handey
Top
0 members in this topic: None
+ 1 guest(s)


[02:25 am]
Deathman101 -- http://www.staredit.net/?p=modnight read and you can go to SF's Realm
[02:16 am]
[lil-Inferno]:] -- Epic phail.
[02:16 am]
[lil-Inferno]:] -- I don't know how to get SF realm, and my brother is on my comp with SC :P .
[02:14 am]
[Vi3t-X]:] -- Inferno @ SF Realm. Come test something quickly nub.
[02:05 am]
[lil-Inferno]:] -- I need you to go into the enemy base and killz tehm awll bai yuorslef.
[02:04 am]
[lil-Inferno]:] -- Be quiet Privatecake!
[02:01 am]
Generalpie -- i'm back from my pinful arm and leg injuries!!!
You must log in to shout.

©2003-2008 Staredit Network.
Starcraft & Starcraft II are trademarks of Blizzard Entertainment.
Site Index   |   Terms of Service   |   Privacy Policy   |   Contributions