I wanted to point out that you're not using the And condition correctly in the Train Marine trigger of this tutorial. The way you have it set up in the video:
if ((UnitGetOwner(EventUnitProgressUnit()) == 1) && ((UnitGetType(EventUnitProgressUnit()) == "Barracks") &&))
Notice the '&&' at the very end. This is the 'And' that is in your trigger and it is automatically removed from the script. When there are multiple statements in a condition clause, such as in your trigger, the script automatically puts an '&&' between them, thus the first '&&' in the Galaxy statement above. Because of this, you end up getting your desired effect from the trigger, even though it's implemented incorrectly. It's a good thing you weren't wanting to use an Or statement, otherwise it wouldn't have worked out for you. :) If you want to use the 'And' statement correctly, here's how it should look:
You may decide to use the above for readability purposes, but since you know that '&&' is added automatically between conditions, you also have the option to simplify the condition to:
This tutorial is to show you how to create units that will automatically train like you have seen in castle fights or nexus wars
thanks everyone check it out Sorry everyone it is really hard to read the trigger writing cause my screen res was set to high
I will be making a new video soon
I wanted to point out that you're not using the And condition correctly in the Train Marine trigger of this tutorial. The way you have it set up in the video:
What this is saying in Galaxy is:
if ((UnitGetOwner(EventUnitProgressUnit()) == 1) && ((UnitGetType(EventUnitProgressUnit()) == "Barracks") &&))
Notice the '&&' at the very end. This is the 'And' that is in your trigger and it is automatically removed from the script. When there are multiple statements in a condition clause, such as in your trigger, the script automatically puts an '&&' between them, thus the first '&&' in the Galaxy statement above. Because of this, you end up getting your desired effect from the trigger, even though it's implemented incorrectly. It's a good thing you weren't wanting to use an Or statement, otherwise it wouldn't have worked out for you. :) If you want to use the 'And' statement correctly, here's how it should look:
You may decide to use the above for readability purposes, but since you know that '&&' is added automatically between conditions, you also have the option to simplify the condition to:
@Customstarcraft: Go
I've made a movie about the Data Editor Method to do the same as you did with triggers.
It can be found here:
or you can watch it on this page.
Thank you Helral
I just tested out your tutorial works really well thank you just what i wanted it to do.
thank you very much for the awesome tutorial!