| 08-27-2006, 12:23 AM | #1 |
In order to limit a spell from being cast, i used the tech requirement method. I have 3 triggers, but i want to know if it could be done with less. I am using WEU if that helps. 1. Creates the unit for the tech requirement Trigger: Flaming Egg Limit
2.kills the tech unit, thus preventing casting Trigger: 3.remakes the tech unit again Trigger: Sorry for all the trigger but this is the only way i could think up... :p If any of you guys know a better way to do this, please let me know! +rep |
| 08-27-2006, 12:30 AM | #2 |
You could merge the first and last trigger. Give it both events and both conditions inside an or statement. It's not much of an improovement for in-game performance, but you get one trigger less which might be of some convenience when organizing them in the editor. |
| 08-27-2006, 12:39 AM | #3 |
| 08-27-2006, 02:27 AM | #4 | |
Quote:
is just OK. |
| 08-27-2006, 09:39 AM | #5 |
| 08-27-2006, 11:14 AM | #6 | |
Quote:
Wyvernoid was pointing out you use 2 Or's in one line, so he said change it to: Trigger: Which is right. The final correct condition would be: |
| 08-27-2006, 11:45 AM | #7 |
Thank you for pointing me out again, TideHunter^^ And darkwulfv... if you've learned boolean calculating, the following would be equivalent to the one TH modified above. Trigger: Code:
bool1 or (bool2 or (bool3 or bool4)) = bool1 or bool2 or bool3 or bool4 |
| 08-27-2006, 01:15 PM | #8 | |
Quote:
Boolexpr is an or/and combination of pointers to functions that return boolean, so they are not the same as booleans |
| 08-27-2006, 01:17 PM | #9 |
Ah my fault ;-) So it should still equal to Boolean in JASS ^^ Sorry for that |
| 08-27-2006, 04:32 PM | #10 |
Thanks Wyvernoid, +rep. It's more organized that i can say for a fact. |
