Moderator
M
Moderator
23:11, 16th Jun 2010
Hanky:
Looks good even if I don't like the indexing system. But well, approved!
Hanky:
Looks good even if I don't like the indexing system. But well, approved!
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
(7 ratings)
Approved

Hehehebaassee said:and I dont dare to review lawl![]()

Humm? Point out where the leak is... maybe someone can help.
If you don't know what leaks... how could you know it leaks in the first place!? :s
PLEASE don't tell me you're using stupid leak checker? Because that doesn't function quietly well as far as I know...
Fire Ball Setings

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Fireball

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




FB_Skip Equal to 0



Then - Actions




Trigger - Turn on Fire Ball Loop <gen>



Else - Actions


Set FB_Skip = (FB_Skip + 1)


Set FB_Times = (FB_Times + 1)


Set FB_Off[FB_Times] = True


-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------


-------- I have set 1 more boolean variable. It check if missile is "big" or "small". "Big" are fireballs what Hero make. "Small" are fragments. So by cheking this boolean variable actions for "small" and "big" missiles will be not same. --------


-------- Fireball mooving an same height and impact on enemys. Fragments move with parabola and cause small AoE damage --------


-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------


Set FB_Big[FB_Times] = True


-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------


Set FB_Hero[FB_Times] = (Casting unit)


Set FB_Point[0] = (Position of (Casting unit))


Set FB_Point[1] = (Target point of ability being cast)


-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------


-------- Lets set angle, damage, distance, speed, AoE etc. --------


-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------


Set FB_Angle[FB_Times] = (Angle from FB_Point[0] to FB_Point[1])


Set FB_Distance[FB_Times] = 800.00


Set FB_Speed[FB_Times] = 15.00


-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------


Set FB_Damage[FB_Times] = (60.00 + (60.00 x (Real((Level of Fireball for (Casting unit))))))


Set FB_AoE[FB_Times] = 250.00


Set FB_Colision[FB_Times] = (50.00 + (20.00 x (Real((Level of Fireball for (Casting unit))))))


Set FB_Fragments[FB_Times] = (2 + (1 x (Level of Fireball for (Casting unit))))


-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------


-------- Set scaling of dummy. Biger damage - biger dummy :) --------


-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------


Set FB_Scale = (90.00 + (10.00 x (Real((Level of Fireball for (Casting unit))))))


Unit - Create 1 Dummy for (Owner of FB_Hero[FB_Times]) at FB_Point[0] facing FB_Angle[FB_Times] degrees


Set FB_Missile[FB_Times] = (Last created unit)


Animation - Change FB_Missile[FB_Times] flying height to 40.00 at 0.00


Animation - Change FB_Missile[FB_Times]'s size to (FB_Scale%, FB_Scale%, FB_Scale%) of its original size


-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------


-------- Just with 1 special effect dummy dont looks good. Lets create 2 effects :) --------


-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------


Special Effect - Create a special effect attached to the chest of FB_Missile[FB_Times] using Abilities\Weapons\RedDragonBreath\RedDragonMissile.mdl


Special Effect - Create a special effect attached to the chest of FB_Missile[FB_Times] using Abilities\Weapons\FireBallMissile\FireBallMissile.mdl


Custom script: call RemoveLocation ( udg_FB_Point[0] )


Custom script: call RemoveLocation ( udg_FB_Point[1] )
Fire Ball Loop

Events


Time - Every 0.02 seconds of game time

Conditions

Actions


-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------


-------- Every FB_Times become FB --------


-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------


For each (Integer FB) from 1 to FB_Times, do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






FB_Off[FB] Equal to True





Then - Actions






Set FB_Point[2] = (Position of FB_Missile[FB])






Set FB_Point[3] = (FB_Point[2] offset by FB_Speed[FB] towards FB_Angle[FB] degrees)






Unit - Move FB_Missile[FB] instantly to FB_Point[3]






-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------






-------- Distance is descreased by speed every time when missile move. --------






-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------






Set FB_Distance[FB] = (FB_Distance[FB] - FB_Speed[FB])






-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------






-------- Below is condition which check if missile is "big" or "small". --------






-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








FB_Big[FB] Equal to True







Then - Actions








-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------








-------- If it is, then actions for fireball will be runing --------








-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------








Set FB_Group[FB] = (Units within FB_Colision[FB] of FB_Point[3] matching (((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) is A structure) Equal to False)) and (((((Matching unit) is A flying unit) Equal to False) and (((Matching unit) is dead) Equal to








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










(Number of units in FB_Group[FB]) Greater than 0









Then - Actions










-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------










-------- Fireball just tuch something, Lets create Explosion! :D --------










-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------










Special Effect - Create a special effect at FB_Point[3] using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl










Special Effect - Destroy (Last created special effect)










-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------










-------- Group will be destroyed and set again, because uther units theare will be damaged --------










-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------










Custom script: call DestroyGroup ( udg_FB_Group[udg_FB] )










Set FB_Group[FB] = (Units within FB_AoE[FB] of FB_Point[3] matching (((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) is A structure) Equal to False)) and (((((Matching unit) is A flying unit) Equal to False) and (((Matching unit) is dead) Equal to Fals










Unit Group - Pick every unit in FB_Group[FB] and do (Actions)











Loop - Actions












Unit - Cause FB_Hero[FB] to damage (Picked unit), dealing FB_Damage[FB] damage of attack type Spells and damage type Fire










Custom script: call DestroyGroup ( udg_FB_Group[udg_FB] )










-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------










-------- Distance being 0 because fireball impact on unit and will not move anymore --------










-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------










Set FB_Distance[FB] = 0.00










Set FB_Point[4] = (Position of FB_Missile[FB])










-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------










-------- Here it is. Below is loop which set up fragments. --------










-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------










For each (Integer A) from 1 to FB_Fragments[FB], do (Actions)











Loop - Actions












Set FB_Skip = (FB_Skip + 1)












Set FB_Times = (FB_Times + 1)












Set FB_Off[FB_Times] = True












-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------












-------- FB_Big will be false because it is just small fragment :P --------












-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------












Set FB_Big[FB_Times] = False












-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------












Set FB_Hero[FB_Times] = FB_Hero[FB]












-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------












-------- MaxDistance and height are needed for parabola calculation --------












-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------












Set FB_Angle[FB_Times] = (FB_Angle[FB] + (Random real number between -60.00 and 60.00))












Set FB_Distance[FB_Times] = (Random real number between 200.00 and 400.00)












Set FB_MaxDistance[FB_Times] = FB_Distance[FB_Times]












Set FB_Speed[FB_Times] = (FB_MaxDistance[FB_Times] x 0.02)












Set FB_Height[FB_Times] = (Random real number between 100.00 and 200.00)












-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------












-------- Fragments will deal 4 times leaser damage. Reduce IT! :) --------












-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------












Set FB_Damage[FB_Times] = (FB_Damage[FB] / 4.00)












Set FB_AoE[FB_Times] = 150.00












-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------












-------- Scale is half (50 %), but you can change it. --------












-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------












Set FB_Scale = 50.00












Unit - Create 1 Dummy for (Owner of FB_Hero[FB_Times]) at FB_Point[4] facing FB_Angle[FB_Times] degrees












Set FB_Missile[FB_Times] = (Last created unit)












Animation - Change FB_Missile[FB_Times]'s size to (FB_Scale%, FB_Scale%, FB_Scale%) of its original size












Special Effect - Create a special effect attached to the chest of FB_Missile[FB_Times] using Abilities\Weapons\RedDragonBreath\RedDragonMissile.mdl










-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------










-------- Upper loop action used just 1 point. Remove to do not cause leaks --------










-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------










Custom script: call RemoveLocation ( udg_FB_Point[4] )









Else - Actions







Else - Actions








-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------








-------- This actions will be done if Missile is not "Big", it is fragment height changed to parabola variable to give a look of arc --------








-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------








Set FB_Parabola[FB] = (((4.00 x FB_Height[FB]) / FB_MaxDistance[FB]) x ((FB_MaxDistance[FB] - FB_Distance[FB]) x (FB_Distance[FB] / FB_MaxDistance[FB])))








Animation - Change FB_Missile[FB] flying height to FB_Parabola[FB] at 0.00






-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------






-------- Distance is 0, then missile killed --------






-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








FB_Distance[FB] Less than or equal to 0.00







Then - Actions








-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------








-------- W8! Not all missiles diying at same way! Fragments deal damage when diying! :) --------








-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










FB_Big[FB] Equal to False









Then - Actions










Set FB_Group[FB] = (Units within FB_AoE[FB] of FB_Point[3] matching (((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) is A structure) Equal to False)) and (((((Matching unit) is A flying unit) Equal to False) and (((Matching unit) is dead) Equal to Fals










Unit Group - Pick every unit in FB_Group[FB] and do (Actions)











Loop - Actions












Unit - Cause FB_Hero[FB] to damage (Picked unit), dealing FB_Damage[FB] damage of attack type Spells and damage type Fire










Custom script: call DestroyGroup ( udg_FB_Group[udg_FB] )










-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------










-------- Special effect for eyecandy and sound of effect destroyed --------










-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------










Special Effect - Create a special effect at FB_Point[3] using Abilities\Weapons\RedDragonBreath\RedDragonMissile.mdl










Special Effect - Destroy (Last created special effect)









Else - Actions








-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------








-------- Finaly kill missile! :P --------








-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------








Unit - Kill FB_Missile[FB]








-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------








-------- FB_Skip reduced by 1, because it check if some spells are runing --------








-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------








Set FB_Skip = (FB_Skip - 1)








Set FB_Off[FB] = False








-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------








-------- If FB_Skip is 0, then no spells are exist. Loop shud repeat 0 times (FB_Times set to 0 too) and turn trigger off. Dont need trigger to run when no spells are runing :P --------








-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










FB_Skip Equal to 0









Then - Actions










Set FB_Times = 0










Trigger - Turn off (This trigger)









Else - Actions







Else - Actions






-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------






-------- Almost forgot ^^ Clear leaks ^^ --------






-------- ---------------------------------------------------------------------------------------------------------------------------------------------------------- --------






Custom script: call RemoveLocation ( udg_FB_Point[2] )






Custom script: call RemoveLocation ( udg_FB_Point[3] )





Else - Actions

Special Effect - Create a special effect attached to the chest of FB_Missile[FB_Times] using Abilities\Weapons\RedDragonBreath\RedDragonMissile.mdl
Special Effect - Create a special effect attached to the chest of FB_Missile[FB_Times] using Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
Oh man you should have done that a long time ago!
Here it is:
You don't only need to remove the unit you attach the effects too... but store the effects into variables and destroy them too.
Special Effect - Create a special effect attached to the chest of FB_Missile[FB_Times] using Abilities\Weapons\RedDragonBreath\RedDragonMissile.mdl
Special Effect - Create a special effect attached to the chest of FB_Missile[FB_Times] using Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
Effects are the things that cause the most lag if not destroyed (that's an educated guess, I might be wrong)...
No they don't...NFWar said:Effects attached to dummy destroys automaticaly when dummy dies
Man, leak and lag are two whole different things!
No they don't...
There's nothing in Warcraft that "destroys automatically" unless you're using some advance GUI system...


Ik spell still isn't workingGo to the object editor ability and set Hero Ability to false.
I know how to make it a unit instead of hero ability, but the spell dosent work regardlessNo idea what you mean by that.
IT WORKZ! I just forgot the Dummy unit"Spell doesnt work" isn't very helpful. You should specify what about it doesnt work and possibly posting the test map.


