• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Spawning units and attacking as a group (scroll down) =)??

Status
Not open for further replies.
Level 7
Joined
Oct 6, 2006
Messages
293
Ok on my map im trying to make peasants spawn up to my max food cap. Every trigger I try trigures the peasants every 30 seconds but it goes past the cap and makes it red. Any suggestions? Currently just tried

Events
Time - Every 30.00 seconds of game time
Conditions N/A
Actions
If all conditions are true then do actions else do actions.
If - condtions
Player 1 Red food max Not Equal to number of living peasants owned by player 1.
Then- actions
Unit - Create 1 Peasant for Player 1(red) at random point in north Town center <gen> facting defualt building degree's.
Else actions
Do nothing

Made with triggers no jass. It seems so simple and Im sure it is but just cant make them stop spawning once the amount of peasants equals my food cap. Ive tried other triggers messing with the food cap and max etc.
 
Level 2
Joined
Sep 12, 2006
Messages
23
hmm well, this is something i came up with in about 5 seconds, not even sure if it will work.

Code:
Peasant Spawn
    Events
        Time - Every 30.00 seconds of game time
    Conditions
        PeasantNumber Less than or equal to (X - 1)
    Actions
        Unit - Create 1 Peasant for Player 1 (Red) at (Point) facing Default building facing degrees
        Set PeasantNumber = (PeasantNumber + 1)

X=Max food cap

Try that and let me know if it works ^.^
 
Level 7
Joined
Oct 6, 2006
Messages
293
Making a peasant build around the radius of a building

Ok just wondering if i can make a peasant build a certain distance from a point or unit so if you left the game running you would probably have a perfect circle of buildings around the point or unit?
 
Level 7
Joined
Oct 6, 2006
Messages
293
Last question for the nite

Ok was wondering the best way to spawn a group of units at once around a barracks?. Say like right now I have a instant click ability linked to trigger that spawns 20 footman all around the barracks. Im fine with it but trying to find a trigger to send them all in to attack-move to at once. I just did make last created unit attack unit hoping it would send them all since they were all created about the same but i guess not. Only one of them went in to attack. After this im going to call it a nite and catch some sleep. Progress going alright since I spent about 4hours on it atleast.
 
Status
Not open for further replies.
Top