| 06-30-2009, 04:48 AM | #2 | |
Quote:
|
| 06-30-2009, 08:43 AM | #3 |
As Vexorian said, linear loops could shorten the code... in GUI, but I guess it'll become slower, longer and very, very crappy when the internal compiler converts it to JASS. It's better for you to stick with what you've got, unless... not to sound unoriginal, "unless you learn JASS". |
| 07-01-2009, 12:38 AM | #4 |
Thanks very much nonetheless. Very appreciated. I guess I'll just stick with what I have, and hope I won't have to make any future changes to the trigger... it involved a lot of copying & pasting, ahahahah. xD |
| 07-01-2009, 04:48 AM | #5 |
If I'm not mistaken, this: Set Integer_ReferenceX = 1![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)![]() ![]() If - Conditions![]() ![]() ![]() (Item-type of (Item carried by (Triggering unit) in slot Integer_ReferenceX)) Not equal to Rusted Sword![]() ![]() ![]() (Item-type of (Item carried by (Triggering unit) in slot Integer_ReferenceX)) Not equal to Rusted Shield![]() ![]() ![]() (Item-type of (Item carried by (Triggering unit) in slot Integer_ReferenceX)) Not equal to Rusted Armor![]() ![]() Else - Actions![]() Set Integer_ReferenceX = 2![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)![]() ![]() If - Conditions![]() ![]() ![]() (Item-type of (Item carried by (Triggering unit) in slot Integer_ReferenceX)) Not equal to Rusted Sword![]() ![]() ![]() (Item-type of (Item carried by (Triggering unit) in slot Integer_ReferenceX)) Not equal to Rusted Shield![]() ![]() ![]() (Item-type of (Item carried by (Triggering unit) in slot Integer_ReferenceX)) Not equal to Rusted Armor![]() ![]() Else - Actions![]() Set Integer_ReferenceX = 3![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)![]() ![]() If - Conditions![]() ![]() ![]() (Item-type of (Item carried by (Triggering unit) in slot Integer_ReferenceX)) Not equal to Rusted Sword![]() ![]() ![]() (Item-type of (Item carried by (Triggering unit) in slot Integer_ReferenceX)) Not equal to Rusted Shield![]() ![]() ![]() (Item-type of (Item carried by (Triggering unit) in slot Integer_ReferenceX)) Not equal to Rusted Armor![]() ![]() Else - Actions![]() Set Integer_ReferenceX = 4![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)![]() ![]() If - Conditions![]() ![]() ![]() (Item-type of (Item carried by (Triggering unit) in slot Integer_ReferenceX)) Not equal to Rusted Sword![]() ![]() ![]() (Item-type of (Item carried by (Triggering unit) in slot Integer_ReferenceX)) Not equal to Rusted Shield![]() ![]() ![]() (Item-type of (Item carried by (Triggering unit) in slot Integer_ReferenceX)) Not equal to Rusted Armor![]() ![]() Else - Actions![]() Set Integer_ReferenceX = 5![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)![]() ![]() If - Conditions![]() ![]() ![]() (Item-type of (Item carried by (Triggering unit) in slot Integer_ReferenceX)) Not equal to Rusted Sword![]() ![]() ![]() (Item-type of (Item carried by (Triggering unit) in slot Integer_ReferenceX)) Not equal to Rusted Shield![]() ![]() ![]() (Item-type of (Item carried by (Triggering unit) in slot Integer_ReferenceX)) Not equal to Rusted Armor![]() ![]() Else - Actions![]() Set Integer_ReferenceX = 6![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)![]() ![]() If - Conditions![]() ![]() ![]() (Item-type of (Item carried by (Triggering unit) in slot Integer_ReferenceX)) Not equal to Rusted Sword![]() ![]() ![]() (Item-type of (Item carried by (Triggering unit) in slot Integer_ReferenceX)) Not equal to Rusted Shield![]() ![]() ![]() (Item-type of (Item carried by (Triggering unit) in slot Integer_ReferenceX)) Not equal to Rusted Armor![]() ![]() Else - ActionsCan be condensed to this: Actions![]() For each (Integer A) from 1 to 6, do (Actions)![]() ![]() Loop - Actions![]() ![]() ![]() If (All Conditions are True) then do (Then Actions) else do (Else Actions)![]() ![]() ![]() ![]() If - Conditions![]() ![]() ![]() ![]() ![]() (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Not equal to (!=) Crown of Kings +5![]() ![]() ![]() ![]() ![]() (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Not equal to (!=) Crown of Kings +5![]() ![]() ![]() ![]() ![]() (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Not equal to (!=) Crown of Kings +5![]() ![]() ![]() ![]() Else - Actions |
