I have a trigger that displays how much minerals and gas you get from killing an enemy in a text tag, and since I couldn't find a way to refer to this in the text tag I am in the process of doing it manually for each unit type in an If/Then/Else. This works fine if I only have one kind of unit in it, but if I add a second Else that asks for a second unit type, I get a syntax error when I try to test the map. Am I doing something wrong?
The syntax error highlights the "Unit type == Hydralisk" line and it does this even if I replace the Hydralisk with another unit type, so I'm pretty sure it has to do with adding subsequent units.
From the looks of it the 2nd "General- Else if" is part of the actions of the 1st, Which means it cant ever run because your triggering unit type cant be 2 unit types.
make it like this
General - If (Conditions) then do multiple (Actions)
If Then Else
General - Else if (Conditions) then do (Actions)
Else If (your conditions)
Then (your actions if those conditions are true)
General - Else if (Conditions) then do (Actions)
Else If (other conditions)
Then (these actions if the other conditions are true)
and fyi, the way "if then else multiple" works is that it goes down the list of conditions and the 1st that are true, it will run the actions for those conditions, and none of the actions for any other conditions in that "if then else multiple"
Your second if-then statement is inside your first if-then statement. Its says If triggering unit is Baneling THEN if triggering unit is hydralisk. That breaks it because the triggering unit cant be two units.
Hi everyone, first post here. :o
I have a trigger that displays how much minerals and gas you get from killing an enemy in a text tag, and since I couldn't find a way to refer to this in the text tag I am in the process of doing it manually for each unit type in an If/Then/Else. This works fine if I only have one kind of unit in it, but if I add a second Else that asks for a second unit type, I get a syntax error when I try to test the map. Am I doing something wrong?
The syntax error highlights the "Unit type == Hydralisk" line and it does this even if I replace the Hydralisk with another unit type, so I'm pretty sure it has to do with adding subsequent units.
From the looks of it the 2nd "General- Else if" is part of the actions of the 1st, Which means it cant ever run because your triggering unit type cant be 2 unit types.
make it like this
General - If (Conditions) then do multiple (Actions)
If Then Else
General - Else if (Conditions) then do (Actions)
Else If (your conditions)
Then (your actions if those conditions are true)
General - Else if (Conditions) then do (Actions)
Else If (other conditions)
Then (these actions if the other conditions are true)
and fyi, the way "if then else multiple" works is that it goes down the list of conditions and the 1st that are true, it will run the actions for those conditions, and none of the actions for any other conditions in that "if then else multiple"
Your second if-then statement is inside your first if-then statement. Its says If triggering unit is Baneling THEN if triggering unit is hydralisk. That breaks it because the triggering unit cant be two units.
Aaah! I see; it works now. Thank you both! :)