HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

i need an anti lag

10-14-2003, 03:15 AM#1
Crimsongg137
ok in my map when u create a barrack it creates 1 unit every 10 secs and i want u able to creat u to 3 barracks because people would make like 20 and then lag the server.. any ideas. ..
10-14-2003, 03:46 AM#2
SpectreReturns
What in bloody hell did you just say?
10-14-2003, 03:54 AM#3
Crimsongg137
i want to make a limit on a buildin like only 3 aloud in the game
10-14-2003, 03:55 AM#4
SpectreReturns
Oh, its a trigger.
Code:
Player - Restrict (Barracks) to (3)
or something like that
10-14-2003, 04:00 AM#5
Crimsongg137
k thanx let me check it out
10-14-2003, 04:21 AM#6
Crimsongg137
uhh i found it but it doesnt work
10-14-2003, 08:43 AM#7
HEZZA
why dont u just make an upgrade on the barrack that makes unit come faster for that 1 barrack
10-14-2003, 07:52 PM#8
Crimsongg137
o could do that but that wont stop the barracks form makin units at a postion because i have set a trigger that says when unit ownd type of barrack equal to player then create unit footman at start location.. and i wanna limit the barrack so it wont create like 30 barracks to have 30 men every 10 secs
10-14-2003, 11:00 PM#9
theJ89
Event - A unit finishes contrustion
Conditions - Number of Barracks owned by Owner of Triggering Unit = 3
Action - Kill Triggering Unit
10-14-2003, 11:33 PM#10
AllPainful
Quote:
Originally posted by theJ89
Event - A unit finishes contrustion
Conditions - Number of Barracks owned by Owner of Triggering Unit = 3
Action - Kill Triggering Unit


This is good, except if you do it that way the person loses the money, you would have to either give the money back to the person via the trigger, OR.

Code:
Event 
  A unit starts construction
Conditions 
  unit(Constructing Unit) is equal to barracks
  Number of Barracks owned by player(Owner of constructing unit) equal to 3
Action 
  Order unit(construction unit) to cancel
  Send message to player(owner of unit(constructing unit)) equal to "You already own the maximum number of barracks.  Construction of another has been cancelled."

This will give them some of thier gold back (what ever you have the gameplay constants set to give back to player when a building is cancelled.)


On another note:

Quote:
Originally posted by SpectreReturns
Oh, its a trigger.
Code:
Player - Restrict (Barracks) to (3)
or something like that


This particular action only works on Trained and Purchased units I believe, not on buildings... Just for future reference.
10-15-2003, 12:10 AM#11
Crimsongg137
thanks alot for the help