| 12-22-2003, 02:39 AM | #1 |
i gotta question, i know that adding waits to triggers is good sometimes, but i would like to know a few things... a) Y is it a good thing... b) Y do the triggers not fire off the things u have in order sometimes... (i.e i had a trigger in my map, that w/o wait would return double number of mana, cause it would kill unit that it was getting mana from and bring bacto life, but it would count both units mana... i had no idea what bug was until i added a wait cause last part of trigger wasn't running at all......) c) Y sometimes, a wait for .01 seconds does nothing to help you, but a wait for .1 does... does the longer a wait make it better at helping triggers stay focused or whatever?...... i dont know it just seems kinda strange 2 me. keep in mind that i am just begining to learn the fundementals of JASS so if the reasoning is to hard, just plz tell me in which cases i should include waits, or aim me to a good thread on this... |
| 12-22-2003, 03:09 AM | #2 |
I only use waits during cinematics, or when not using a wait would crash the game (replacing a dropped item which for some reason decides not to drop instantly) |
| 12-22-2003, 11:11 PM | #3 |
Loop - Actions Set x = 0 Unit Group - Pick every unit in (Units owned by Players[(Integer A)] of type |c00075798City Level 1|r) and do (Actions) Loop - Actions Set x = (x + (Integer((Mana of (Picked unit))))) Unit Group - Pick every unit in (Units owned by Players[(Integer A)] of type |c00075798City Level 2|r) and do (Actions) Loop - Actions Set x = (x + (Integer((Mana of (Picked unit))))) Unit Group - Pick every unit in (Units owned by Players[(Integer A)] of type |c00075798City Level 3|r) and do (Actions) Loop - Actions Set x = (x + (Integer((Mana of (Picked unit))))) Unit Group - Pick every unit in (Units owned by Players[(Integer A)] of type |c00075798City Level 4|r) and do (Actions) Loop - Actions Set x = (x + (Integer((Mana of (Picked unit))))) Unit Group - Pick every unit in (Units owned by Players[(Integer A)] of type |c00075798City Level 5|r) and do (Actions) Loop - Actions Set x = (x + (Integer((Mana of (Picked unit))))) Unit Group - Pick every unit in (Units owned by Players[(Integer A)] of type |c00075798City Level 6|r) and do (Actions) Loop - Actions Set x = (x + (Integer((Mana of (Picked unit))))) Unit Group - Pick every unit in (Units owned by Players[(Integer A)] of type |c00075798City Level 7|r) and do (Actions) Loop - Actions Set x = (x + (Integer((Mana of (Picked unit))))) Unit Group - Pick every unit in (Units owned by Players[(Integer A)] of type |c00075798City Level 8|r) and do (Actions) Loop - Actions Set x = (x + (Integer((Mana of (Picked unit))))) Unit Group - Pick every unit in (Units owned by Players[(Integer A)] of type |c00075798City Level 9|r) and do (Actions) Loop - Actions Set x = (x + (Integer((Mana of (Picked unit))))) Unit Group - Pick every unit in (Units owned by Players[(Integer A)] of type |c00075798City Level 10|r) and do (Actions) Loop - Actions Set x = (x + (Integer((Mana of (Picked unit))))) Set Player_Population[(Integer A)] = x Set y = Player_Food[(Integer A)] If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions y Equal to 0 Then - Actions Set y = -1 Else - Actions Set Player_Happiness[(Integer A)] = (x / y) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions Player_Happiness[(Integer A)] Greater than or equal to 0 Player_Happiness[(Integer A)] Less than 200 Then - Actions Set Player_Happiness[(Integer A)] = 2 Multiboard - Set the text for Player_Resorce_Boards[(Integer A)] item in column 6, row 12 to |c0000ff00+2|r Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions Or - Any (Conditions) are true Conditions Player_Happiness[(Integer A)] Less than 0 Player_Happiness[(Integer A)] Greater than or equal to 1000 Then - Actions Set Player_Happiness[(Integer A)] = 0 Multiboard - Set the text for Player_Resorce_Boards[(Integer A)] item in column 6, row 12 to |c00fa0c050|r Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions Player_Happiness[(Integer A)] Greater than or equal to 200 Player_Happiness[(Integer A)] Less than 1000 Then - Actions Set Player_Happiness[(Integer A)] = 1 Multiboard - Set the text for Player_Resorce_Boards[(Integer A)] item in column 6, row 12 to |c00ecf52c+1|r Else - Actions ok, thats my trigger. what is annoying me, is that it seems to stop somewhere... i dont know y, but after awile, u stop getting resorces... (i know there is a shitload of variables in this, dont worry bout them,) its just i would like to know WHY sometimes stuff doesn't happen... oh and i did debug and put a game message 2 all and it did fire.. so y doesn't it do all the other opperations?!?! |
| 12-23-2003, 12:57 AM | #4 |
Add messages, like Trigger # Check # and then run it... You'll notice pretty quick how far it gets, or which actions it jumps... As in response to weaaddar's 'not using waits'... That works fine until the time comes for trigger-driven spells ;). Regards Dead-Inside |
| 12-30-2003, 12:23 PM | #5 |
this thread is kinda old now, but i would like to say that, the problem has not been fixed, i do not use waits in it at all, i just run it on a different timer, that is started after the old 1, so that i dont have 2 put a wait at begining. it still does exact same thing... 10-12 turns into game, it stops working. i have now come 2 the belife that it is a memory leak problem that the REST of the triggers generate creating a problem (less available memory on even one comp maybe blows it for all comps, cause from what ive heard, the mem leak shouldn't be THAT big...?) |
