| 03-07-2007, 09:22 PM | #1 |
For some reason whenever I have a dummy unit cast a spell based off of thunder clap the game lags for 1/2 a second, and I was told it's from spell leaks. How do I fix this? |
| 03-07-2007, 10:05 PM | #2 |
This really goes to triggers. /moved Just post the trigger of the dummy spell? |
| 03-08-2007, 01:39 AM | #4 |
Hmm...illidan92? |
| 03-08-2007, 01:58 AM | #5 |
For starters the first one has got a location leak |
| 03-08-2007, 02:23 AM | #6 |
Reading all those BJs was painful. JASS:function Trig_Illumination_Rounds_Conditions takes nothing returns boolean return GetSpellAbilityId()=='A018' and udg_FO_ShellsRemaining>=udg_FO_Shells endfunction function Trig_Illumination_Rounds_Actions takes nothing returns nothing local location l1 = GetSpellTargetLoc() local location l2 local unit u = GetSpellAbilityUnit() local integer i1 = 1 local integer i2 = udg_FO_Shells local integer i3 = udg_FO_Radius local effect e1 local unit other local player p = GetOwningPlayer(u) call PingMinimapLocForForceEx( GetPlayersAll(), (l1), 5.00, bj_MINIMAPPINGSTYLE_SIMPLE, 100.00, 50, 50.00 ) set udg_FO_ShellsRemaining = ( udg_FO_ShellsRemaining - udg_FO_Shells ) call DisplayTimedTextToForce( GetForceOfPlayer(GetTriggerPlayer()), 5.00, ( "Shells Remaining: " + I2S(udg_FO_ShellsRemaining) ) ) set e1 = AddSpecialEffectLoc( "Abilities\\Spells\\Human\\ManaFlare\\ManaFlareTarget.mdl", l1 ) call PolledWait( ( 10.00 - I2R(GetUnitAbilityLevel(u, 'A011')) ) ) call DestroyEffect(e1) loop exitwhen i1 > i2 set l2=(PolarProjectionBJ((l1), GetRandomReal(0.00,I2R(i3)), GetRandomDirectionDeg())) set other = CreateUnitAtLoc(p, 'h003', l2, 0) call UnitAddAbility(other, 'A00P') call SetUnitAbilityLevel( other, 'A00P', GetUnitAbilityLevel(u, 'A018')) call UnitApplyTimedLife(other, 'BTLF', 5.00) call IssuePointOrderLoc( other, "farsight", (l2) ) set other = CreateUnitAtLoc(p, 'h003', l2, 0) call UnitAddAbility(other, 'A01A') call SetUnitAbilityLevel( other, 'A01A', GetUnitAbilityLevel(u, 'A018')) call UnitApplyTimedLife(other, 'BTLF', 5.00) call IssueImmediateOrder( other, "thunderclap" ) call PolledWait( GetRandomReal(1.2, 2.85) ) set i1 = i1 + 1 endloop call RemoveLocation(l1) call RemoveLocation(l2) set l1=null set l2=null set e1=null set u=null set other = null set p = null endfunction JASS:function Trig_Plasma_Rocket_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A01G' endfunction function Trig_Plasma_Rocket_Actions takes nothing returns nothing local location l=OffsetLocation(GetSpellTargetLoc(), GetRandomReal(-50.00, 50.00), GetRandomReal(-50.00, 50.00)) local unit u=GetSpellAbilityUnit() local unit other local texttag tt =CreateTextTagUnitBJ( ( ( "|cffFF0000" + GetUnitName((u)) ) + ": FIRE IN THE HOLE!" ), (u), 25.00, 8.00, 50.00, 100, 50.00, 10.00 ) local player p = GetOwningPlayer(u) local location loc = GetUnitLoc(u) call SetTextTagLifespanBJ( tt, 3.00 ) call SetTextTagPermanentBJ( GetLastCreatedTextTag(), false ) call PlaySoundOnUnitBJ( gg_snd_RadioFeedback_3D, 100, (u) ) set other = CreateUnitAtLoc(p, 'h003', loc, 0 ) call UnitApplyTimedLife( other, 'BTLF', 4.00) call PolledWait( 3.00 ) set other = CreateUnitAtLoc(p, 'h003', loc, 0 ) call UnitApplyTimedLife( other, 'BTLF', 4.00) call UnitAddAbility( other, 'A00F') call IssuePointOrderLoc( u, "clusterrockets", (l) ) call PolledWait( 1.0 ) set other = CreateUnitAtLoc(p, 'h003', l, 0 ) call UnitApplyTimedLife( other, 'BTLF', 5.00) call UnitAddAbility(other, 'A01I') call SetUnitAbilityLevel( other, 'A01I', GetUnitAbilityLevel(u, 'A01G')) call IssueImmediateOrder( other, "thunderclap" ) call DestroyEffect(AddSpecialEffectLoc("war3mapImported\\BigExplosionBlue.mdx", (l))) call UnitDamagePointLoc( (u), 0, ( 450.00 + ( 50.00 * I2R(GetUnitAbilityLevel(u, 'A01G')) ) ), (l), ( 400.00 + ( 200.00 * I2R(GetUnitAbilityLevel(u, 'A01G')) ) ), ATTACK_TYPE_MAGIC, DAMAGE_TYPE_NORMAL ) call RemoveLocation(l) call RemoveLocation(loc) set other = null set u=null set l = null set loc = null set p = null endfunction |
| 03-08-2007, 01:09 PM | #7 |
Does the area have lots of doodads? I've heard reports of extreme lag when spells which cause terrain deformation are used in areas with lots of them. Try basing it off something like Warstomp and see what happens. |
| 03-08-2007, 01:41 PM | #8 |
Just use Aoe Storm bolt and trigger the sfx. It happens on maps with alot of imports. |
