| 05-08-2014, 06:32 PM | #1 |
I been having issues replacing the Peasants at the start of the game. (See attached map below) The objective is to remove the ability to "Build Buildings like humans". I found out that option is only changed by changing the race in the object manager. So changing the Worker to "Commoner" race allows me to achieve this option. (Orc race also does this along with many others, I just chose commoner as preference) I tried a simple "Chaos" Ability so I didn't have to use triggers, but I had a problem. I decided that triggers were needed since the "Build Buildings like humans" problem came up AGAIN! Problem is the trigger is not done correctly, because it is not replacing the units. Trigger: PS - I hate being a newb at triggers! EDIT: I do know that just changing "Peasant" to race "Commoner" fixes the issue now, but I also would like to have a working trigger for future projects I might need. |
| 05-09-2014, 07:30 AM | #2 |
You need to use a different event, "unit enters region (playable map area)". Then, use "triggering unit" instead of "matching unit" in the rest of your trigger. "Matching unit" is supposed to be used only when you are doing a "pick every unit * matching condition" action. |
| 05-09-2014, 12:14 PM | #3 | |
Quote:
I also want to make sure I am not creating any memory leaks. |
| 05-09-2014, 02:33 PM | #4 | |
I was thinking of something more like this: Trigger: Quote:
|
| 05-09-2014, 05:13 PM | #5 | |
Quote:
|
| 05-09-2014, 08:06 PM | #6 | |
Quote:
However, if you aren't intimidated by JASS, I'd certainly recommend switching to it. You can just try converting triggers to JASS on your own or you can follow the excellent Introduction to JASS tutorial. When working with JASS, it is highly recommended to use the NewGen editor for the vJass language extension that comes with it, as well as other nice features such as a compiler that doesn't crash as often, function lists and auto-completion. |
| 05-10-2014, 02:16 PM | #7 | |
Quote:
|
| 05-10-2014, 05:40 PM | #8 |
