Ok i've been very frustrated because i'm basicly done with the map as far as making every unit balanced, but unfortunately this trigger is vital accualy make the map run. Im making a map called Zergling Blood, an old map from SC1. I've been stuck with this trigger for 3 days now and i finnaly asking for help. Its simple yet not working.
Event
-Unit - Any Unit Enters (region)
Conditions
- Owner of (Triggering unit)) == 1
Actions
- Unit Group - Add (Triggering unit) to (HydraliskGroupP1)
HydraliskGroupP1 is an empty group Unit i made. It won't allow the unit to go into the HydraliskGroupP1
... why won't this trigger work. Please help it won't add the unit into the unit group.
None.
This is not enough information to determine what is wrong. Are you sure the trigger is running? Maybe using the debug window would help determine your problem.
None.
as far as i know, it's set up right..
are you sure the region and groups are named correctly in every trigger that uses them?
None.
Yes all spelling is correct.
The following trigger for the group is
Events
Timer - Every 0.1 sec of Game Time
Conditions
(Number of Any units in HydraliskGroupP1) >=2
Actions
Unit - Create 1 Hydralisk for player 1 at (HerospawnP1
Unit - Kill (Unit 2 from HydraliskGroupP1)
Unit - Kill (Unit 1 from HydraliskGroupP1)
None.
The 2nd trigger works. Ive seen it work by changing the timer to 5 sec. and adding 2 units in the map and IN THE group itself. After 5 sec into the game i watch the the units die and spawns a hydralisk. Getting a unit(after 50 kills u get a unit) that isn't in the game yet and run into a region just won't work.
None.
Just by the way, you want to kill the first two units of the unit group, but you are, with this trigger, killing the #2 and #3 unit.
The index starts by 0, so unit 1 = 0, unit 2 = 1, unit 3 = 2...
"Enters Location" only runs when a unit enters the location or got spawned (by ability or trigger) in it. It does not run when the unit was placed there in the editor.
Please report errors in the Staredit.Network forum.
Just by the way, you want to kill the first two units of the unit group, but you are, with this trigger, killing the #2 and #3 unit.
The index starts by 0, so unit 1 = 0, unit 2 = 1, unit 3 = 2...
"Enters Location" only runs when a unit enters the location or got spawned (by ability or trigger) in it. It does not run when the unit was placed there in the editor.
Those certainly should be part of a SC2 FAQ thread! O.o
None.
Events
Timer - Every 0.1 sec of Game Time
Conditions
(Number of Any units in HydraliskGroupP1) >=2
Actions
Unit - Create 1 Hydralisk for player 1 at (HerospawnP1
Unit - Kill (Unit 2 from HydraliskGroupP1)
Unit - Kill (Unit 1 from HydraliskGroupP1)
I don't know about using a 0.01 game time thing... I have no idea how Galaxy is going to handle that...
That being said... What I would probably do is something like... (without pulling exact functions)
When a unit enters region
If (unitType == typeOfUnitYouWantToKill)
{
Add unit to unit group (unitsToBeKilled)
}
if (numberOfUnits in unitsToBeKilled > 1)
{
kill unit in unitsToBeKilled
kill unit in unitsToBeKilled
}
Then you'd need
When unit leaves region
If (triggeringUnit == in unit group unitsToBeKilled)
{
remove triggering unit from (unitsToBeKilled)
}
This way the "group" of units that are to be killed is not dependent on the units in the region and you don't have to worry about crazy 0.01 executions, and even if 12 units all enter the region at the "same time" The worst case scenario you have is 2 units die and 10 of them are hanging out... which the player only needs to move one out and back in again over and over OR... you can add more code... to the end to check to see if there are <2 units in the unit group.
Oh yeah... the biggest advantage of this is you don't have to worry about keeping count of anything...
None.