| 09-05-2008, 11:37 AM | #1 |
Guys, I am making my map, and I use GetUnitTypeId(u) to know the id of a unit. Problem is that in this line JASS:if (GetUnitTypeId(u) == ARCHER_ID) and countArchers then knowing that countArchers is tru, and ARCHER_ID is the Id of the archers and it is correct "earc", the computer tells me that the unit type is false. I don't understand, the integer is well set, I checked twice. JASS:private constant integer ARCHER_ID = 'earc' However if I change that globals to: JASS:private constant integer ARCHER_ID = 1700884333 This is weird, can some one explain me why this happens ? |
| 09-05-2008, 11:49 AM | #2 |
'earc' == 1700885091 (Archer) 'eaom' == 1700884333 (Ancient of War) So, is u actually an AoW? |
| 09-05-2008, 12:13 PM | #3 |
This is stupid, I can't train a building ! The trigger is fired when I finish training a unit ... why does it fire only if I use AoW !? |
| 09-05-2008, 12:28 PM | #4 |
you are using the wrong event response... |
| 09-05-2008, 09:45 PM | #5 | |
Quote:
What should I use to know when I finish training a unit ? Afaik UNIT_EVENT_TRAIN_FINISH (or something like this) is the only one I know =S |
| 09-05-2008, 10:41 PM | #6 |
There's two different units involved with training. JASS:GetSoldUnit() //The unit you're training. GetSellingUnit() //The building you're training from. You want the first one. |
| 09-05-2008, 11:33 PM | #7 | |
Quote:
|
| 09-06-2008, 09:58 AM | #8 | |
Mmm, you mean Quote:
D'Oh ... Silly me, and me thinking I had found a great bug xD Sorry for this silly question guys, +rep to you all EDIT Crap, sorry Vexorian and Alex I can't ive you guys +rep because I have to spread it first =S |
