| 12-27-2003, 12:15 AM | #1 |
in the map i have finished Land & Sea, there are LOTS of pick every unit of type matching condition type loops... from what i have gathered reading threads for about an hour a day, i have come to belive this could be the reason that some of my other triggers stop running at random points in the game (makeing a great game suck, cause u dont know when it will stop funtioning). HOW do i fix this(i dont know JASS very well) or, if you are willing to fix this for me, and i have seen u post a lot so i know u wont steal my map, ill send you my unprotected map if u post ur email address. THX |
| 12-27-2003, 12:52 AM | #2 |
Wow, I had this same problem with my map long ago. It would run triggers incorrectly. I started the map before the patch 1.10 and after when it was patch the triggers started messing. I had tons of triggers too. |
| 12-27-2003, 07:20 AM | #3 | |
Quote:
Really, the best thing you can do is to optimize your code by converting it to JASS. I can have a go and see if it has any effect if you want. If you say you want me too then I'll PM you my email address. |
| 12-27-2003, 06:26 PM | #4 |
oh, great 35263526 id actually love it if u could take a look, from what ive read u know a lot more than i do about programing. please do pm me your email. oh and are u ever going to finish that tile reading thing.... that would help A LOT... but only if it would work over bnet, cause im not a big fan of singleplayer things like the FPS mod people were doing.. who would trade multiplayer... even if it is the BEST game ever, single player can never compete in my mind. |
| 12-27-2003, 07:37 PM | #5 |
No need to convert to JASS. Just put a custom script action with the following line of code in it, and put it before all of your unit groups (Well, only those unit groups you don't store in a group variable): Code:
set bj_wantDestroyGroup = true This will make it automatically kill the leak after the group actions are done. It gets set back to false after each one though. So you need to put this custom script action before every unit group, not just once. Have fun =) |
| 12-27-2003, 11:51 PM | #6 |
i was about to do this just now and i thought a second... wait where do i position this again? BEFORE i call the unit group... that doesn't really make sence to me, wouldn't i wanna kill it AFTER i done with the group? plz example the placement in this trigger: Lumber Events Time - time expires Conditions Actions Unit Group - Pick every unit in (Units of type |c0014ba46Wood Chop|r) and do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Item carried by (Picked unit) of type |c00008040W|r|c00008055o|r|c0000806bo|r|c00008080d|r) Equal to No item Then - Actions Hero - Create |c00008040W|r|c00008055o|r|c0000806bo|r|c00008080d|r and give it to (Picked unit) Item - Make (Last created item) Undroppable Else - Actions Set x = 0 Set currunit = (Picked unit) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Item carried by (Picked unit) of type |c0000a4a4Workers|r) Equal to No item Then - Actions Hero - Create |c0000a4a4Workers|r and give it to (Picked unit) Item - Make (Last created item) Undroppable Else - Actions Item - Set charges remaining in (Item carried by currunit of type |c0000a4a4Workers|r) to 0 Set y = (Number of units in (Units owned by (Owner of currunit) matching (((Matching unit) is loaded into currunit) Equal to True))) Item - Set charges remaining in (Item carried by currunit of type |c0000a4a4Workers|r) to y Destructible - Pick every destructible within ResorceRadius[(Player number of (Owner of (Picked unit)))] of (Position of (Picked unit)) and do (Actions) Loop - Actions Set x = (x + 6) Set x = (Integer((((Real(x)) / 10.00) x (Real(((Charges remaining in (Item carried by currunit of type |c0000a4a4Workers|r)) + (Number of units in (Units owned by (Owner of currunit) matching (((Unit-type of (Matching unit)) Equal to Slave) and (((Matching unit) is l Set x = (Integer(((Real(x)) x (((Real(Player_Wood_Harvest_Modifier[(Player number of (Owner of currunit))])) / 100.00) + 1.00)))) Item - Set charges remaining in (Item carried by currunit of type |c00008040W|r|c00008055o|r|c0000806bo|r|c00008080d|r) to x Player - Add x to (Owner of (Picked unit)) Current lumber |
