i have never cared about memory leaks before, but im making a new awesome map so i really do not want any memory leaks. can someone take a look at this and tell if you see any leaks in it
Code:
toxic breath
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Toxic Breath (Breath of Fire (Neutral Hostile))
Actions
Custom script: local unit disease1
Custom script: local unit disease2
Custom script: local unit disease3
Custom script: local location targetloc = GetSpellTargetLoc()
Custom script: local location unitlocation = PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 75.00, AngleBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()), targetloc))
Custom script: local location movepoint = PolarProjectionBJ( unitlocation, 256, AngleBetweenPoints(unitlocation, targetloc))
Custom script: call CreateNUnitsAtLoc( 1, 'e000', GetOwningPlayer(GetSpellAbilityUnit()), unitlocation, bj_UNIT_FACING )
Custom script: set disease1 = GetLastCreatedUnit()
Custom script: call SetUnitPathing( disease1, false )
Custom script: call CreateNUnitsAtLoc( 1, 'e000', GetOwningPlayer(GetSpellAbilityUnit()), unitlocation, bj_UNIT_FACING )
Custom script: set disease2 = GetLastCreatedUnit()
Custom script: call SetUnitPathing( disease2, false )
Custom script: call CreateNUnitsAtLoc( 1, 'e000', GetOwningPlayer(GetSpellAbilityUnit()), unitlocation, bj_UNIT_FACING )
Custom script: set disease3 = GetLastCreatedUnit()
Custom script: call SetUnitPathing( disease3, false )
Custom script: call IssuePointOrderLocBJ( disease1, "move", movepoint )
Custom script: set movepoint = PolarProjectionBJ( unitlocation, 256, ( AngleBetweenPoints( unitlocation, targetloc ) + 25.00 ) )
Custom script: call IssuePointOrderLocBJ( disease2, "move", movepoint )
Custom script: set movepoint = PolarProjectionBJ( unitlocation, 256, ( AngleBetweenPoints( unitlocation, targetloc ) - 25.00 ) )
Custom script: call IssuePointOrderLocBJ( disease3, "move", movepoint )
Custom script: call RemoveLocation( targetloc )
Custom script: call RemoveLocation( unitlocation )
Custom script: call RemoveLocation( movepoint )
Wait 0.90 seconds
Custom script: call RemoveUnit( disease1 )
Custom script: call RemoveUnit( disease2 )
Custom script: call RemoveUnit( disease3 )


