Well, this trigger seems good to me, so I can't just point at the thing that doesn't work, but I can help you find it out:
If something doesn't work and you don't know why, you'll have to debug it. That means you inspect certain parts of your trigger and see whether they work on their own or not.
For example the "Pick Each Unit"-loop. Maybe it doesn't catch the right units.
To make sure it does, we'll just add a new action in front of the other two loop actions. It's important that it's IN FRONT of the other two, since sometimes actions can "break" a trigger and make it stop working.
As a debug action you could use "Display Text message". Just make it display the name of the (picked unit), then test the map. If it shows the right names, then we know that this part of your trigger works.
If it does not show it could have several reasons:
1) The loop isn't even being run. Maybe events/conditions are wrong or so.
2) Maybe engineers within other units' cargo will not be counted as being on the map (that sounds pretty reasonable).
3) Maybe something is wrong with your conditions.. could the engineers accidently count as missile-type maybe? Or have you chosen the wrong unit type?
The color change thing was for debugging :D It didnt work, it didnt chose the correct units. The problem is solved now; first of all, units that are in cargo are hidden. And: On unit type chosing, it mustn't be chosen "Game Link", it ruins it. No idea why :D
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi, I made an Engineer Unit Type. Now I wrote a trigger.
But it does not work. I can't understand why. Thanks. fortuneNext
:( Nobody has any idea? *bump*
Well, this trigger seems good to me, so I can't just point at the thing that doesn't work, but I can help you find it out:
If something doesn't work and you don't know why, you'll have to debug it. That means you inspect certain parts of your trigger and see whether they work on their own or not.
For example the "Pick Each Unit"-loop. Maybe it doesn't catch the right units.
To make sure it does, we'll just add a new action in front of the other two loop actions. It's important that it's IN FRONT of the other two, since sometimes actions can "break" a trigger and make it stop working.
As a debug action you could use "Display Text message". Just make it display the name of the (picked unit), then test the map. If it shows the right names, then we know that this part of your trigger works.
If it does not show it could have several reasons:
1) The loop isn't even being run. Maybe events/conditions are wrong or so.
2) Maybe engineers within other units' cargo will not be counted as being on the map (that sounds pretty reasonable).
3) Maybe something is wrong with your conditions.. could the engineers accidently count as missile-type maybe? Or have you chosen the wrong unit type?
And so on.
The color change thing was for debugging :D It didnt work, it didnt chose the correct units. The problem is solved now; first of all, units that are in cargo are hidden. And: On unit type chosing, it mustn't be chosen "Game Link", it ruins it. No idea why :D