| 01-21-2006, 11:01 PM | #2 |
Errm... What exactly are you doing? |
| 01-21-2006, 11:02 PM | #3 |
I don't think there's a better way unless there is a way to make wc3 read your thoughts or something |
| 01-21-2006, 11:27 PM | #4 |
thank you |
| 01-21-2006, 11:45 PM | #5 |
Read my tutorial here : http://www.wc3campaigns.com/showthread.php?t=73104 You could save yourself a little bit of time and space space, not a lot, just a little. |
| 01-22-2006, 12:12 AM | #6 |
dont neeed to. i have my own and my quesiton is answered |
| 01-22-2006, 01:37 AM | #7 |
Action Steps - Create a new variable named SpawnIndex, type Game Cache JASS:function Initialisation takes nothing returns nothing set udg_SpawnIndex = InitGameCache( "SpawnIndex.w3v" ) call StoreInteger(udg_SpawnIndex, "1", "1", "1") call StoreInteger(udg_SpawnIndex, "1", "2", "2") call StoreInteger(udg_SpawnIndex, "1", "3", "0") call StoreInteger(udg_SpawnIndex, "1", "4", "0") call StoreInteger(udg_SpawnIndex, "1", "5", "0") call StoreInteger(udg_SpawnIndex, "1", "6", "0") call TriggerSleepAction(0) call StoreInteger(udg_SpawnIndex, "2", "1", "1") call StoreInteger(udg_SpawnIndex, "2", "2", "0") call StoreInteger(udg_SpawnIndex, "2", "3", "0") call StoreInteger(udg_SpawnIndex, "2", "4", "2") call StoreInteger(udg_SpawnIndex, "2", "5", "0") call StoreInteger(udg_SpawnIndex, "2", "6", "0") call TriggerSleepAction(0) (Repeat until all waves are done..) endfunction JASS:function Waves takes nothing returns nothing local integer i = 1 set udg_Current_Wave = udg_Current_Wave + 1 set udg_Spawned_Amount = udg_Spawned_Amount + udg_Spawn_Increment loop exitwhen i > 6 set Spawn_Index[i] = GetStoredInteger( udg_SpawnIndex, I2S(udg_Current_Wave), I2S(i) ) set i = i + 1 endloop call PolledWait( udg_Wave_Wait ) call EnableTrigger(gg_trg_Main_Spawn) call PolledWait( 120.00 ) call DisableTrigger(gg_trg_Main_Spawn) if ( udg_Current_Wave > 25 ) then call ExecuteFunc("Waves") else call ExecuteFunc("TheEnd") endif endfunction I believe that this method may be more organized, easier to edit and shorter, removing the unnecessary duplication of effort for each wave. Notes : - call StoreInteger(udg_SpawnIndex, YourWave, YourIndex, YourValue) - TriggerSleepAction(0) is used as a break. Personal preference. - PolledWait is for accuracy reasons. |
