Staredit Network

Staredit Network -> UMS Assistance -> [SOLVED] Giving building to comp when creating unit
Report, edit, etc...Posted by CheezyTheCheezeCake on 2006-12-05 at 10:14:25
Problem solved. Thanks to Jamal.
Report, edit, etc...Posted by green_meklar on 2006-12-05 at 10:48:38
Make a large location, say 6X6...small ones may work but I can't guarantee it. Then:

Trigger
Players:
¤ EaSt SaNd CaStLe WaRrIoRs
Conditions:
¤ Current player commands at least 1 terran marine
Actions:
¤ Center location labeled 'Give Building' on terran marine owned by current player at anywhere
¤ Remove all terran marine for current player at Give Building
¤ Give all terran barracks belonging to current player at Give Building to [your side's computer]
¤ Preserve trigger


Something along those lines should do it.
Report, edit, etc...Posted by CheezyTheCheezeCake on 2006-12-05 at 13:42:05
Thanks,but wait.. Now that the computer has the barracks.. Uhm..

How do i make the barracks create that unit in for example every 10 seconds?
Report, edit, etc...Posted by Owyn on 2006-12-05 at 13:49:10
QUOTE
How do i make the barracks create that unit in for example every 10 seconds?

for comp player? you can't make something or som1 build something.

just ¤ Center location labeled 'Give Building' on Barracks owned by current player at anywhere.
create 1 marine at Give Building.
wait 5sec
preserve.
Report, edit, etc...Posted by CheezyTheCheezeCake on 2006-12-05 at 14:27:35
Well,yeah but it can't be merged with the above post or it would just add one marine for every barracks... That's the problem.
Report, edit, etc...Posted by green_meklar on 2006-12-05 at 15:14:58
QUOTE
Thanks,but wait.. Now that the computer has the barracks.. Uhm..

How do i make the barracks create that unit in for example every 10 seconds?

Now that is much harder. All I can think of is to run an AI script and then give the computer just enough resources every few seconds to build one unit (with more resources for more buildings). It would probably be more effective just to create the units rather than actually building them, although even this isn't easy.
Report, edit, etc...Posted by CheezyTheCheezeCake on 2006-12-05 at 15:24:15
Yes, I'll have to use the create trigger but uhm.. Now i need the barracks to create units. 1 marine every 10 seconds because i builded a marine from the barracks and that's the hard part. I could do so it makes 1 marine when you give the barracks to the computer,but it has to do it once every 10 seconds.

uhm... That was much harder to explain than i thought
Report, edit, etc...Posted by Kookster on 2006-12-05 at 15:27:07
QUOTE
wait 5sec

NO NO NO NO Waits!!!!! If you have multiple players waiting at once it creates TONS of lag so do it through a death counter form! IE

Condition:
Always
Action:
Add 1 death of marine for player 8
Preserve

Condition:
Player 8 has 60 deaths of marine
Action:
Create 1 marine at Location.....
Set player 8 to 0 deaths of Marine
preserve


Also for death counters to work right you must have Hyper triggers which is 3 triggers of 63 waits of 0 for a computer player then preserved so it would look alot like this:


Player:
A computer player preferable player 8
Condition:
Always
Action:
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Wait 0 miliseconds
Preserve Trigger

Now the trigger should be maxed on Wait 0 miliseconds except one preserve.
make sure you have 3 of these triggers. Its also ok to put a comment in them so they look small in the editor.
Report, edit, etc...Posted by CheezyTheCheezeCake on 2006-12-05 at 15:38:30
Wow,that was somenthing new.. I'll try that.
I can use death on any unit,right?
Report, edit, etc...Posted by spinesheath on 2006-12-05 at 15:45:09
Why should it lag with several players? Waits only affect waits or the same player. You could - or must? - say every player has his own wait stack.
Report, edit, etc...Posted by Oo.Jamal.oO on 2006-12-05 at 15:47:09
I think you got this idea off of Sand Wars?

Anyway.. You would have to have it something like..


null
Trigger
Players:
¤ Player #
Conditions:
¤ Current Player brings at least 1 Marine to Anywhere.
Actions:
¤ Remove 1 Marine For Current Player At Anywhere
¤ Give barracks for Current Player to Player 5
¤ Preserve Trigger


If they built a barracks and a ghost, give it to Player 6, and so on.


Then have it so every 10 seconds..


null
Trigger
Players:
¤ Player #
Conditions:
¤ Player 5 commands at least 1 Barracks
¤ Switch 1 is set
Actions:
¤ Center location labed "Spawn Marine" on Barracks owned by Player 5 at "Anywhere
¤ Create 1 Marine for Player 5 at "Spawn"
¤ Give Barracks for Player 5 at "Spawn" to Player 1
¤ Preserve Trigger.


It would be player 6 commands a barracks create a ghost..

Then..


null
Trigger
Players:
¤ Player #
Conditions:
¤ Player # brings at least 1 Barracks to Anywhere
¤ Player 5 brings at most 0 Barracks to Anywhere
¤ Switch 1 is Set
Actions:
¤ Clear Switch 1
¤ Give all Barracks owned by Player 1 at Anywhere to Player 5.
¤ Preserve Trigger


And..


null
Trigger
Players:
¤ Player #
Conditions:
¤ Player # brings at most 0 Barracks to Anywhere
¤ Player 5 brings at least 1 Barracks to Anywhere
¤ Switch 1 is Cleared
Actions:
¤ Wait for 10000 milliseconds.
¤ Set Switch 1




Might not be the best system (Probably isn't) but best I can give you for 2 minutes of thinking..



Report, edit, etc...Posted by CheezyTheCheezeCake on 2006-12-05 at 16:03:58
I think i'll have to use death counts..

I got this idea from Sand Castle Wars,yes.

ADDITION:
Okay so,do i need exactly 63 waits? I can only have 62 if i have comment.
Report, edit, etc...Posted by Kookster on 2006-12-05 at 16:06:36
its ok to have a bit less, just put in as many as possible.
Report, edit, etc...Posted by Oo.Jamal.oO on 2006-12-05 at 16:30:36
I fill it up with 0 waits, delete 2, preserve triggers, comment.
Report, edit, etc...Posted by Kookster on 2006-12-05 at 16:33:51
QUOTE
I fill it up with 0 waits, delete 2, preserve triggers, comment.

Exactly!
Report, edit, etc...Posted by fritfrat(U) on 2006-12-05 at 16:53:21
And then just have 3 or more copies of the waits.

Really, what you want could work with waits, but it would save a lot of trouble and restrictions for later if you used a counter such as deaths.
Report, edit, etc...Posted by CheezyTheCheezeCake on 2006-12-05 at 16:56:37
Jamal has solved the problem. I'm using his trigger system.

There's just one thing Jamal,you get back the barracks and have to build agian. Could you remove that? I'm too frightened to test myself >.<
Report, edit, etc...Posted by Oo.Jamal.oO on 2006-12-05 at 17:13:48
FIXED


null
Trigger
Players:
¤ Player #
Conditions:
¤ Current Player brings at least 1 Marine to Anywhere.
Actions:
¤ Remove 1 Marine For Current Player At Anywhere
¤ Center location labeled "Barracks" on Barracks owned by Current Player at Anywhere.
¤ Give barracks for Current Player at "Barracks" to Player 5
¤ Preserve Trigger


If they built a barracks and a ghost, give it to Player 6, and so on.


Then have it so every 10 seconds..


null
Trigger
Players:
¤ Player #
Conditions:
¤ Player 5 commands at least 1 Barracks
¤ Switch 1 is set
Actions:
¤ Center location labed "Spawn Marine" on Barracks owned by Player 5 at "Anywhere
¤ Create 1 Marine for Player 5 at "Spawn"
¤ Give Barracks for Player 5 at "Spawn" to Player 1
¤ Create 1 "zergling" (Could also add 1 custom, but I think this system is better.) for current player at "Location"
¤ Preserve Trigger.


It would be player 6 commands a barracks create a ghost..
And create a different unit..

Then..


null
Trigger
Players:
¤ Player #
Conditions:
¤ Player # brings at least 1 Barracks to Anywhere
¤ Player 5 brings at most 0 Barracks to Anywhere
¤ Switch 1 is Set
Actions:
¤ Clear Switch 1
¤ Preserve Trigger


And..


null
Trigger
Players:
¤ Player #
Conditions:
¤ Player # brings at most 0 Barracks to Anywhere
¤ Player 5 brings at least 1 Barracks to Anywhere
¤ Switch 1 is Cleared
Actions:
¤ Wait for 10000 milliseconds.
¤ Set Switch 1


And last..


null
Trigger
Players:
¤ Player #
Conditions:
¤ Switch 1 is Cleared
¤ Current Player commands at least 1 zergling
Actions:
¤ Remove 1 Zergling For Current Player At Anywhere
¤ Give 1 Barracks owned by Current Player to Player 5
¤ Preserve Trigger



Change lings for each ghost..


Anyway, for the factories it would be the same thing, player 5 would be a goliath, and etc..
Report, edit, etc...Posted by Kookster on 2006-12-05 at 18:35:37
thats what I was saying, well very close to it. He just put it in text form. Good Stuff!!
Report, edit, etc...Posted by Mr.Chicken on 2006-12-06 at 00:19:57
QUOTE(green_meklar @ Dec 5 2006, 11:48 AM)
Make a large location, say 6X6...small ones may work but I can't guarantee it. Then:




Trigger
Players:
¤ EaSt SaNd CaStLe WaRrIoRs
Conditions:
¤ Current player commands at least 1 terran marine
Actions:
¤ Center location labeled 'Give Building' on terran marine owned by current player at anywhere
¤ Remove all terran marine for current player at Give Building
¤ Give all terran barracks belonging to current player at Give Building to [your side's computer]
¤ Preserve trigger


Something along those lines should do it.
[right][snapback]599630[/snapback][/right]


tongue.gif From Sand Castle Wars biggrin.gif
Report, edit, etc...Posted by Heegu on 2006-12-06 at 03:13:20
Create a burrowed unit under the barracks to detect what it spawns.
Report, edit, etc...Posted by CheezyTheCheezeCake on 2006-12-06 at 12:04:45
Ah,wait.. All units spawn in the same time,if you/anyone know how to make them spawn right after they have been builded and keep spawning at that time(Like in sand castle wars),please tell tongue.gif

It would be useful and i want the units to spawn in different time delay.
Otherwise they all will be spawned with one huge army every 10 seconds.

ADDITION:
Oh wow,i'm having such troubles with this.

I have currently done this on firebat and ghost. And now it creates a firebat when i make a ghost... And then when i make a firebat,nothing spawns. On the third barracks making a firebat,it makes one ghost and two firebats(As it's supposed to) And after the third barracks,it continues making units perfectly...

Can this be because i used switch 1 on firebat and ghost?
I have no idea what switches are used for.

When i tried switch 2.. Uhm.. I had troubles too.
All i can remember was that it permamently started to create ghosts all the time every second.
Report, edit, etc...Posted by Heegu on 2006-12-06 at 13:10:37
QUOTE(CheezyTheCheezeCake @ Dec 6 2006, 08:04 PM)
I have no idea what switches are used for.
[right][snapback]600254[/snapback][/right]


tutorial
Report, edit, etc...Posted by green_meklar on 2006-12-06 at 18:58:16
QUOTE
From Sand Castle Wars

Does it really match that well? I just wrote down what I would do to achieve the same effect.
Next Page (1)