Ok I am trying to destroy the pylons which a probe has built in the game when he buys sometihng from the shop (i got rid of the attribute of armored and it is ust structure) and they dont die when i tell em too, probs something really easy as I AM tired :P thnks for help.
your last 'pick each unit' thing looks fucked. just delete that line and redo it. Or add a debug line of "Text message" to be sure the kill is being reached.
Is the pick each unit meant to be picking units only belonging to player 1? Seems to be you want to be picking units belonging to the player found in the "Picked Player" function.
It's your Pick Unit in unit group and kill pick unit command.
You should use "Pick Unit" and then convert Unit to unit group. And then change the unit group to function Units in region with alignment.
Or respectively, you can have a previous command to pick units of unit type in region matching condition and kill them,
or
Pick units in region matching condition and add them to a unit group and then later pick all those units from the unit group and kill them.
You can do some tests.
Make up some cheat triggers. So:
Event: Key "K" is pressed my any player,
Pick all units in region with alignment to player ?
Kill picked unit.
UI Display "Text Message - Units should be dead." to all players in chat
That there will test the individual trigger and let you know if that part by itself is working.
How about adding each Pylon created by that player to unit group called "Pylons". And when you want to destroy those Pylons just kill unit group "Pylons".
I don't know exactly what kind of map you are doing but I think that kind of solution is best one.
I don't understand your trigger at first post.. It has nothing to do with Pylons?
You can kill all Pylons any time by doing a trigger that selects all Pylons owned by player X and kill [picked unit].
<<quote 443399>>
I put a Text message at at same time as kill picked unit and the message comes up but they still dont die... ?
<</quote>>
That means it's triggering fine but your one single line is the culprit. It Doesn't pick the units and then kill them. Use Terhonator's suggestion. Guaranteed kill.
All you have to do then is make up one kill trigger for each player. So:
Kill Player 1 Enemy Pylons
Events
Any unit enters region "Bait"
Local Variables
Conditions
(Owner of triggering unit = 1)
Actions
Unit Group - Pick each unit in (Pylon units in (Entire map) owned by player 2 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Kill (Picked unit)
Unit Group - Pick each unit in (Pylon units in (Entire map) owned by player 3 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Kill (Picked unit)
Unit Group - Pick each unit in (Pylon units in (Entire map) owned by player 4 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Kill (Picked unit)
---
Kill Player 2 Enemy Pylons
Events
Any unit enters region "Bait"
Local Variables
Conditions
(Owner of triggering unit = 2)
Actions
Unit Group - Pick each unit in (Pylon units in (Entire map) owned by player 1 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Kill (Picked unit)
Unit Group - Pick each unit in (Pylon units in (Entire map) owned by player 3 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Kill (Picked unit)
Unit Group - Pick each unit in (Pylon units in (Entire map) owned by player 4 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Kill (Picked unit)
-----
etc
And you can keep them separate so that you have your Kill triggers doing exactly what they need to do without you being confused with heaps of information in one trigger.
I got it working! I added them to a unit group then did it so it kills an amount of 2 pylons ownmed by picked integer in that group, so the generally the first two pylons built which is perfect, thanks for all of your help, this community keeps me going!
Ok I am trying to destroy the pylons which a probe has built in the game when he buys sometihng from the shop (i got rid of the attribute of armored and it is ust structure) and they dont die when i tell em too, probs something really easy as I AM tired :P thnks for help.
crazy
your last 'pick each unit' thing looks fucked. just delete that line and redo it. Or add a debug line of "Text message" to be sure the kill is being reached.
i have redone and deleteted and redone a couple of times, can you put down how to do the debug? and a bit more info on whats goin wrong?
@CrazyTwigman: Go
Is the pick each unit meant to be picking units only belonging to player 1? Seems to be you want to be picking units belonging to the player found in the "Picked Player" function.
yeah the picked integer function is being used there so it checks who is going in the region to buy the stuff in the shop
@CrazyTwigman: Go
It's your Pick Unit in unit group and kill pick unit command.
You should use "Pick Unit" and then convert Unit to unit group. And then change the unit group to function Units in region with alignment.
Or respectively, you can have a previous command to pick units of unit type in region matching condition and kill them, or Pick units in region matching condition and add them to a unit group and then later pick all those units from the unit group and kill them.
You can do some tests.
Make up some cheat triggers. So:
Event: Key "K" is pressed my any player,
Pick all units in region with alignment to player ? Kill picked unit. UI Display "Text Message - Units should be dead." to all players in chat
That there will test the individual trigger and let you know if that part by itself is working.
I dont understand, havent I done that already (the first pary?
I put a Text message at at same time as kill picked unit and the message comes up but they still dont die... ?
How about adding each Pylon created by that player to unit group called "Pylons". And when you want to destroy those Pylons just kill unit group "Pylons".
I don't know exactly what kind of map you are doing but I think that kind of solution is best one.
I don't understand your trigger at first post.. It has nothing to do with Pylons?
You can kill all Pylons any time by doing a trigger that selects all Pylons owned by player X and kill [picked unit].
Example trigger:
<<quote 443399>>
I put a Text message at at same time as kill picked unit and the message comes up but they still dont die... ?
<</quote>>
That means it's triggering fine but your one single line is the culprit. It Doesn't pick the units and then kill them. Use Terhonator's suggestion. Guaranteed kill.
All you have to do then is make up one kill trigger for each player. So:
Kill Player 1 Enemy Pylons
Events
Any unit enters region "Bait"
Local Variables
Conditions
(Owner of triggering unit = 1)
Actions
Unit Group - Pick each unit in (Pylon units in (Entire map) owned by player 2 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Kill (Picked unit)
Unit Group - Pick each unit in (Pylon units in (Entire map) owned by player 3 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Kill (Picked unit)
Unit Group - Pick each unit in (Pylon units in (Entire map) owned by player 4 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Kill (Picked unit)
---
Kill Player 2 Enemy Pylons
Events
Any unit enters region "Bait"
Local Variables
Conditions
(Owner of triggering unit = 2)
Actions
Unit Group - Pick each unit in (Pylon units in (Entire map) owned by player 1 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Kill (Picked unit)
Unit Group - Pick each unit in (Pylon units in (Entire map) owned by player 3 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Kill (Picked unit)
Unit Group - Pick each unit in (Pylon units in (Entire map) owned by player 4 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Kill (Picked unit)
-----
etc
And you can keep them separate so that you have your Kill triggers doing exactly what they need to do without you being confused with heaps of information in one trigger.
It's not as condensed but it works.
I got it working! I added them to a unit group then did it so it kills an amount of 2 pylons ownmed by picked integer in that group, so the generally the first two pylons built which is perfect, thanks for all of your help, this community keeps me going!
@CrazyTwigman: Go
Good stuff :D