HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

farmers and hunts

02-23-2005, 10:27 PM#1
Trent14
Hi, I'm triggering a farmers and hunters type map for my friend. Right now I have most everything finished. Except this one thing is really bugging me. There is a building that is supposed to spawn a sheep every 30 seconds. Easy, I can do that. So i test the trigger I had out and hey it works. So I go back and try to get it to spawn at more than one sheep farm. But it only spawns at the last created sheepfarm. I've tried everything I can think of, anyone have any ideas?
02-24-2005, 02:04 AM#2
Raptor--
Quote:
Originally Posted by Trent14
Hi, I'm triggering a farmers and hunters type map for my friend. Right now I have most everything finished. Except this one thing is really bugging me. There is a building that is supposed to spawn a sheep every 30 seconds. Easy, I can do that. So i test the trigger I had out and hey it works. So I go back and try to get it to spawn at more than one sheep farm. But it only spawns at the last created sheepfarm. I've tried everything I can think of, anyone have any ideas?

something along the lines of

event
every 30 seconds

actions
pick all units of type farm
create 1 sheep for owner of picked unit at position of picked unit
02-24-2005, 03:11 PM#3
Guest
There is another way though, you can spawn (or create) in regions close to the farm, it gets handy because you don't have to worry about cooldown, and if you want to spawn 2 sheeps, they'll go at the same time, not 1, then past 1 second another.

I Think Guinsoo uses that kind of stuff on DotA, not sure though.

Here's the generic code:
Quote:
Events
- Time - Every 30.00 seconds of game time
Conditions
- None
Actions
Unit - Create 1 Sheep for <Player> at <Region> facing Default building facing degrees
02-24-2005, 05:13 PM#4
ThyFlame
Add a condition to check if the farm is alive. Yes, it will pick destroyed farms.
03-01-2005, 12:31 AM#5
Trent14
Okay. Well I got that to work. But a new problem arouse. Everytime a hunter kills a sheep. The hunter is supposed to get +2 lumber. In the unit screen I have it set to +2 lumber bounty. And in a seperate trigger I have it set to where everyone gets the bounty for a killed unit. Yet it doesn't give. Weird.... Any idears?
03-01-2005, 01:00 AM#6
Trent14
Hey yeah. Ima dumbass...I had the right trigger all along. It was the fact that i didn't test it by creating a game in WC3, but because I clicked that little test map button. Heh. Yeah apparently a unit created for P6 at the start of mach, without a computer assigned to it, doesn't count as a player. Therefore the bounty does NOT work. Shoot me now. Noob mistake....