Basically, I want every Overlord made from a larvae to die, and converted into Drones, which get created at a location I've written down. It works fine when I make overlords one at a time, but when I make more then 2 or more at the same time, only one drone appears. I want the same number of drones to be created! Not just one...
Here is my code:
Trigger("Player 1"){
Conditions:
Bring("Player 1", "Zerg Overlord", "entire", At least, 1);
Actions:
Kill Unit("Player 1", "Zerg Overlord");
Create Unit("Player 1", "Zerg Drone", 0, "Location 0");
Comment("You got a Drone!");
Preserve Trigger();
}
Anything I can do to make the game spawn the same number of overlords that has been made and killed?
Kill one unit = create a whole bunch How??
-
- Terran Academy Student (50k mineral debt)
- Posts: 5
- Joined: Wed Aug 20, 2008 2:59 am
Kill one unit = create a whole bunch How??
Last edited by lobski on Wed Aug 20, 2008 10:50 am, edited 1 time in total.
- Lavarinth
- Xel'naga Administrator
- Posts: 6539
- Joined: Wed Aug 16, 2006 5:21 pm
- Location: His Ashworld Planet
Re: Kill one unit = create a whole bunch How??
No where in your trigger did you mention Larvae.. So I'm going to make it easier and assume your trigger only means "bring Overlord here, create Drone over here." Must simpler. Have you attempted created the trigger with switches and actual locations?
Such as.. Condition:
- Player 1 has at least 1 Overlord
- Switch Kill Overlord is Off
Action:
- Move Location "Overlord Location" to Overlord
- Turn On switch Kill Overlord
- Preserve Trigger
Condition:
-Switch Kill Overlord is On
Action:
- Kill 1 Unit Overlord at "Overlord Location"
- Create 1 Unit Drone at "Location 0"
- Comment "You got a Drone!"
- Turn Off switch Kill Over
- Preserve Trigger
There's probably something wrong and I'm missing something here.
Such as.. Condition:
- Player 1 has at least 1 Overlord
- Switch Kill Overlord is Off
Action:
- Move Location "Overlord Location" to Overlord
- Turn On switch Kill Overlord
- Preserve Trigger
Condition:
-Switch Kill Overlord is On
Action:
- Kill 1 Unit Overlord at "Overlord Location"
- Create 1 Unit Drone at "Location 0"
- Comment "You got a Drone!"
- Turn Off switch Kill Over
- Preserve Trigger
There's probably something wrong and I'm missing something here.
- - Lavarinth
Campaign Creations Administrator
Campaign Creations Administrator
- Thalraxal
- Protoss Stargate Concierge
- Posts: 1212
- Joined: Sun Aug 12, 2007 12:42 pm
- Location: Ontario, Canada
Re: Kill one unit = create a whole bunch How??
Use the 'Kill Unit at Location' action instead of the 'Kill Unit'. The 'Kill Unit' action kills all units of that type. So when your trigger fires, it kills both Overlords, but only gives you one drone, since the trigger only fired once.
With the 'Kill Unit at Location' you can specify a number of units you kill with it. Set that to one, and you shouldn't have any problem. Well... other then that second Overlord sticking around for two seconds or until the trigger fires again.
Conditions:
Player 1 Brings atleast '1' 'Zerg Overlord' to 'Entire''
Actions:
Kill '1' 'Zerg Overlord' owned by 'Player 1' at 'Anywhere'
Create '1' 'Zerg Drone' at 'Location 0'
Preserve Trigger
With the 'Kill Unit at Location' you can specify a number of units you kill with it. Set that to one, and you shouldn't have any problem. Well... other then that second Overlord sticking around for two seconds or until the trigger fires again.
Conditions:
Player 1 Brings atleast '1' 'Zerg Overlord' to 'Entire''
Actions:
Kill '1' 'Zerg Overlord' owned by 'Player 1' at 'Anywhere'
Create '1' 'Zerg Drone' at 'Location 0'
Preserve Trigger
-
- Terran Academy Student (50k mineral debt)
- Posts: 5
- Joined: Wed Aug 20, 2008 2:59 am
Re: Kill one unit = create a whole bunch How??
I fixed it by myself, I used "Remove unit" instead of kill, and added a timer to wait before creating a drone. Now it works 
Is there a list of commands like "remove unit" or "Move unit" in starcraft that I can take a look at?

Is there a list of commands like "remove unit" or "Move unit" in starcraft that I can take a look at?
- Taeradun
- Protoss Khalai Missionary
- Posts: 1028
- Joined: Thu Sep 07, 2006 6:08 pm
- Location: AU
- Contact:
Re: Kill one unit = create a whole bunch How??
yeah in StarEdit in the trigger editor in the pull-down menu 
[imgwh 462x287]http://i34.tinypic.com/2dskaiv.jpg[/imgwh]
alternately click the "help" button in that window

[imgwh 462x287]http://i34.tinypic.com/2dskaiv.jpg[/imgwh]
alternately click the "help" button in that window
Last edited by Anonymous on Wed Aug 20, 2008 10:05 pm, edited 1 time in total.
