| 07-17-2002, 09:36 PM | #1 |
Guest | Hey i've got a problem and i know ONE of you can solve it: basically what i want to do is, after melee intialization of the map, i want to replace the town hall unit with a tree of life and every peasant with a wisp. The trigger is set off by a player typing "1" into the chat box. the current 2 triggers i'm using are these: trigger #1 //precondition: player types "1" into chat box //postcondition: all workers are replaced with wisps regardless of race Pick every unit in (entire map) owned by (triggering player) and do this if ( (unit type of (picked unit) equal to peasant) or (unit type of (picked unit) equal to peon) or (unit type of (picked unit) equal to acolyte) then replace (picked unit) with wisp else do nothing trigger #2 //precondition: player types "1" into chat box //postcondition: all townhall equivalent units are replaced by tree of life Pick every unit in (entire map) owned by (triggering player) and do this if ( (unit type of (picked unit) equal to town hall) or (unit type of (picked unit) equal to great hall) or (unit type of (picked unit) equal to necropolis) then replace (picked unit) with tree of life else do nothing ---- While these triggers look fine and dandy, for some reason THEY DO NOT WORK. I even added an echo into the trigger so that if it ran successfully i would get the message "Trigger successful!" However, despite the fact that the trigger DOES run, NONE of my units are replaced and everything is still the same. Can anyone think of why this is happening? Or what would be a better trigger? Did i mix something up somewhere, wrong syntax? PLZ... i really need help on this one.... |
| 07-17-2002, 09:58 PM | #2 |
Guest | Picking every unit picks buildings too, I believe. |
| 07-17-2002, 11:20 PM | #3 |
Guest | figured out what was wrong you can't do a massive "if (condition or condition or condition...) then do action..." you have to break them up into smaller "if(condition) then do action" statements... oh well, it was easy enough anyways =0 |
| 07-18-2002, 06:45 AM | #4 |
Are you 100% sure? I used fairly massive ifs in the beta with no problem. |
