Staredit Network

Staredit Network -> UMS Assistance -> Getting Units to Stick to Buildings?
Report, edit, etc...Posted by redfoxbandit on 2006-08-28 at 14:57:53
I'm making a map that allows Zerg drones to build hatcheries, which after building turn into creep colonies controlled by an allied computer to save space. These creep colonies supply 2 invincible medics also controlled by the allied computer that heal surrounding units, but I don't want the medics wandering off with the main player's army when he stops by the creep colony to heal his stuff.

So my question is how do I make it so I can get these medics to stay around the vicinity of the creep colony without using a massive amount of locations, having them disappear after the creep colony is destroyed, and without having a limit on the amount of creep colonies a player can have or make?
Report, edit, etc...Posted by TRiGGaMaSTa on 2006-08-28 at 15:41:04
The answer to your question is burrowed units.

When the currently player brings 1 creep colony to anywhere, when you move the location on it to give it to the computer and create 2 medics, Also create a burrowed drone for the computer player at a _remote location and move it to the creep colony location so that it is directly under the colony.
Note: use a drone because they are the safest units to never unburrow without being told.

QUOTE
CONDITIONS:
- Computer1 brings atleast 1 zerg drone to anywhere
ACTIONS:
- Comment "Begin Check Loop"
- Move location "Big Location" on zerg drone owned by Computer1 at anywhere
- Move location "Small Location" on zerg drone owned by Computer1 at anywhere
- Give 1 zergdrone owned by Computer1 at "Small Location" to Computer2
- Set deaths for Computer 1 set to 1 for "unused unit"
- Preserve Trigger

Setting the death of unused unit will be used as a switch to make sure other triggers do not fire unless there was a drone owned by computer1 which would mean theres a location on a new drone.

QUOTE
CONDITIONS:
- Computer1 brings atleast 1 creep colony to "small Location"
- Computer1 has suffered exactly 1 deaths of "unused unit"
ACTIONS:
- Comment "Hold Medics"
- Set deaths for computer1 set to 0 for "unused unit"
- Order all medics for Computer1 at "Big Location" move to "Big Location"
- Preserve Trigger

QUOTE
CONDITIONS:
- Computer1 brings Exactly 0 creep colony to "small Location"
- Computer1 has suffered exactly 1 deaths of "unused unit"
ACTIONS:
- Comment "Kill Drone Colony has Died"
- Set deaths for computer1 set to 0 for "unused unit"
- Remove zerg drone at "Small Location" for Computer2
- Kill all medic for Computer1 at "Big Location"
- Kill all Creep Colony for Computer1 at "Big Location" //Chain reaction effect to prevent the player from building creep colonies too close to each other
- Preserve Trigger


QUOTE
CONDITIONS:
- Computer1 brings exactly 0 zerg drone to Anywhere
- Computer2 brings atleast 1 zerg drone to Anywhere
ACTIONS:
- Comment "Reset Loop"
- Give all zerg drone owned by Computer2 at Anywhere to Computer1
- Preserve Trigger


Copy these trigger exactly and your problem should be solved. Small location should be a 1x1 location and big location should be about 10x10.
This also means the Computer1 and Computer2 should not control or have any drones. (besides the ones under creep colonys)

Hope this Helped
Report, edit, etc...Posted by redfoxbandit on 2006-08-28 at 15:48:27
That sounds a little too complicated for my liking.
Report, edit, etc...Posted by fritfrat(U) on 2006-08-28 at 16:09:06
T-masta, I didn't even read your post, I have to admit. Too.. unexplained and confusing.



P8 brings atleast 1 creep colony to anywhere: center 2 locations (Big, Small) on creep colony owned by P8, Give Creep colony to P9. Preserve.

Current player brings atmost 1 medic to small, current player brings atleast 2 medic to big, player 9 brings atleast 1 creep colony to big: move all medic owned by current player at big to small. Preserve.

Now copy those two the number of times for the max amount of creep colonies they can get.

Always: Give all creep colonies owned by player 9 to player 8. Preserve.



Now, for removing medics.. be sure to create a burrowed unit somewhere else and move it underneath the creep colonies as you make them. Lets say you give the burrowed drone to p9, in this example.


P8 Suffers Atleast 1 death of Creep Colony, p9 brings exactly 0 zerg drone to Big: center location Big on zerg drone owned by P9.

P8 suffers atleast 1 death of creep colony, current player brings atleast 1 medic to Big, P9 brings atleast 1 drone to Big, P8 brings atleast 1 creep colony to big: give 1 zerg drone at big owned by p9 to p11, center location Big on drone owned by P9.

Now copy that single last one a billion times, too. By billion I mean max possible creep colonies they can build, of course.

P8 suffers atleast 1 death of creep colony, current player brings atleast 1 medic to Big, P9 brings atleast 1 drone to Big, P8 brings exactly 0 creep colony to big: Remove medics at big, remove zerg drone for p9 at big, give all zerg drone at anywhere owned by p11 to p9, set deaths for p8 of Creep Colony to 0.


I probably just ended up typing something extremely similar to what boneless typed, but oh well. Now no one will read my post, either smile.gif
Report, edit, etc...Posted by BRADOSIA on 2006-08-28 at 16:28:17
make a location on all sides of the place u want the medics to stay.
Report, edit, etc...Posted by redfoxbandit on 2006-08-28 at 16:41:52
That won't work...
Report, edit, etc...Posted by fritfrat(U) on 2006-08-28 at 17:31:40
My idea, or his? I looked mine over and made a few edits, I didn't see any errors in mine..
Report, edit, etc...Posted by redfoxbandit on 2006-08-28 at 17:32:56
Yours is complicated enough because I don't want them to have limits. And his won't work because the creep colony locations aren't predefined.
Report, edit, etc...Posted by fritfrat(U) on 2006-08-28 at 17:34:39
You don't need to have a limit in mine, you can just copy those sets of 2 triggers and 1 trigger about 400 times each if you really needed to.. I don't see a way where you could possibly order the medics back if you did not have a trigger for each one, even if they were just copies.

Copying them in scmdraft's trigger editor would be the easiest way to do it, most likely.
Report, edit, etc...Posted by TRiGGaMaSTa on 2006-08-28 at 17:35:04
if you want i could do it for you. if you don't want me to. just copy the triggers i showed you. They will work, and you can have infinitly many creep colonies

Fritfrat, your idea works. but thats alot of triggers needed. thats 4 triggers per creep colony? I know theres no trigger limit but still. What if the creep colonies are near each other?
Report, edit, etc...Posted by redfoxbandit on 2006-08-28 at 17:37:21
Triggamasta, I may send you the map by tonight for you to do it for me, since I have no idea how to...You will recieve credit, as will this entire forum.
Report, edit, etc...Posted by TRiGGaMaSTa on 2006-08-28 at 17:39:49
Via PM? I'd be glad to.
Report, edit, etc...Posted by Kyuubi. on 2006-08-28 at 17:52:36
mm...i don't think triggers would work for player 9...

you can have this:

[Conditions]
-Current player commands at least 1 'creep colony'
[Actions]
-Center Location 'creep colony(location)' at 'creep colony(unit)' at 'anywhere'
-preserve trigger

[next]
Conditions:
-Current player brings at least 1 creep colony(unit) to 'creep colony(location)
-Current player brings exactly 0 medic to 'creep colony'
[Actions]
-Move all medic at 'anywhere' to 'creep colony'
-preserve trigger

[Conditions]
-Current player brings exactly 0 creep colony to location
[Actions]
-Remove medics at anywhere
-preserve trigger

well...im only assuming your using one drone to build a foundation for healing...if there were more places, it would a be a tad more complicated but not impossible. if there are more than one crep colony, you might have to make something for the trigger to disinguish the difference between the colonies.

the first trigger will detect the creep colony when its built, and move the location to the creep colony.

the second trigger will make them sort of bound to the creep colony...but if its computer owned, the medic ai will kick in which makes them want to go to any of their units thats damage to heal them. if there are just medics, then i guess they might stay there, and heal nearby allied units.

third trigger will remove the medics when the creep colony is gone.
Report, edit, etc...Posted by Laser_Dude on 2006-08-28 at 18:02:10
There's one VERY easy trigger to prevent medics from wandering around, don't ask how it works, because frankly, I don't know, it just does.

Trigger
Description:
Prevent meds from moving
Players:
¤ whatever players
Conditions:
¤ always
Actions:
¤ Move All Medics owned by current player at "Anywhere" To "A Location Over Impassible terrain"
¤ Preserve trigger


If you do this, they can heal, use abilities i.e. heal, or attack(if they can attack) but they can't move. If a human player controlls them, they simply don't move, like right clicking with a turret selected.
Report, edit, etc...Posted by Kyuubi. on 2006-08-28 at 18:11:27
QUOTE(laser_dude @ Aug 28 2006, 02:01 PM)
There's one VERY easy trigger to prevent medics from wandering around, don't ask how it works, because frankly, I don't know, it just does.




Trigger
Description:
Prevent meds from moving
Players:
¤ whatever players
Conditions:
¤ always
Actions:
¤ Move All Medics owned by current player at "Anywhere" To "A Location Over Impassible terrain"
¤ Preserve trigger


If you do this, they can heal, use abilities i.e. heal, or attack(if they can attack) but they can't move.  If a human player controlls them, they simply don't move, like right clicking with a turret selected.
[right][snapback]552660[/snapback][/right]

i think if you have that while hyper triggered(most likely), they will be frozen on that spot...they won't move and can't do anythign else. can correct me if i'm wrong if the computer can do anything else besides not moving.
Report, edit, etc...Posted by Shocko on 2006-08-28 at 19:13:31
easiest possible way to keep the medics where they are supposed to be is

Center "X" on p8 creep colony
Move p8 medics to "X"
Give Creep Colony at "X" to p12

then just copy those 3 actions a good 20 times add a preserve trigger and a comment and then have another trigger

P8 commands 0 creep colonies

give all cree colonies p12 to p8
preserve trigger

make X around about 5x5 locations so that the medics don't get to wander off in between trigger

maybe even copy the trigger a couple of times to add to the medics ownage.
Report, edit, etc...Posted by sharf on 2006-08-28 at 19:47:53
all you do is do always move all medics at anywhere to water location(location on water) and they cant move but they can still heal, also if you have a marine or any unit do this the ycant move but they can still attack its kinda like makeing them buildings.
Report, edit, etc...Posted by redfoxbandit on 2006-08-28 at 20:34:06
If I center locations on a P4/P5/P6 creep colony and preserve trigger, does it pick one creep colony to go to and stay there or does it rotate throughout the creep colonies?
Report, edit, etc...Posted by sharf on 2006-08-28 at 20:40:46
rotates
Report, edit, etc...Posted by redfoxbandit on 2006-08-30 at 14:17:40
...No it doesn't.
Report, edit, etc...Posted by PCFredZ on 2006-08-30 at 19:00:37
All of you who typed up triggers with the conditions that even mentioned the word "Creep Colony" are not accounting for the high likelihood that more than 1 Creep Colony will be on the map at a time, and giving the Creep Colony away is just unnecessary (and he might want to morph them to Sunkens/Spores) because if you guys read his original post more carefully, you would have seen this:
QUOTE
I'm making a map that allows Zerg drones to build hatcheries, which after building turn into creep colonies
That simplifies the whole process of creating Medics; remove Hathery, create Creep Colony, create Medics.

After this is done, keeping Medics in place is just simply
QUOTE(sharf @ Aug 28 2006, 07:47 PM)
all you do is do always move all medics at anywhere to water location(location on water) and they cant move but they can still heal, also if you have a marine or any unit do this the ycant move but they can still attack its kinda like makeing them buildings.
[right][snapback]552728[/snapback][/right]

Report, edit, etc...Posted by Laser_Dude on 2006-08-31 at 19:23:09
QUOTE(sharf @ Aug 28 2006, 04:47 PM)
all you do is do always move all medics at anywhere to water location(location on water) and they cant move but they can still heal, also if you have a marine or any unit do this the ycant move but they can still attack its kinda like makeing them buildings.
[right][snapback]552728[/snapback][/right]


I already said that!
Next Page (1)