• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Flamethrower 0.2

The Fire Lord starts to unleash flames toward him, dealing damage to units on them. Also unleash bigs waves of flames that knockback and damage every units toward him and deals damage every second for 2 seconds.
|nLasts 5 seconds.

Level 1 - 10 damage each little flames, 20 damage each waves of flame, 3 damage per second.
Level 2 - 15 damage each little flames, 40 damage each waves of flame, 5 damage per second.
Level 3 - 20 damage each little flames, 60 damage each waves of flame, 7 damage per second.

===============================================================

  • Flamethrower
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Flamethrower
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FT_Index[0] Equal to 0
        • Then - Actions
          • Trigger - Turn on Flamethrower Loop <gen>
        • Else - Actions
      • -------- ----------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Don't change anything except if u know exactly what you are doing --------
      • -------- ----------------------------------------------------------------------------------------------------------------------------------------------- --------
      • Set FT_Index[0] = (FT_Index[0] + 1)
      • Set FT_Index[1] = (FT_Index[1] + 1)
      • Set FT_Caster[FT_Index[0]] = (Triggering unit)
      • Set FT_Angle = (Facing of FT_Caster[FT_Index[0]])
      • Set FT_Level[FT_Index[0]] = (Level of (Ability being cast) for FT_Caster[FT_Index[0]])
      • Set FT_Time[FT_Index[0]] = 5.52
      • Set FT_Time_Intervale[FT_Index[0]] = 0.00
      • Set FT_Run_Trigger[FT_Index[0]] = True
      • -------- ----------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Here you can change the knockback speed --------
      • -------- ----------------------------------------------------------------------------------------------------------------------------------------------- --------
      • Set FT_Knockback_Speed[FT_Index[0]] = 60.00
      • -------- ----------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Here you can change the damage done by the little flames --------
      • -------- ----------------------------------------------------------------------------------------------------------------------------------------------- --------
      • Set FT_Flame_Damage[FT_Index[0]] = (5.00 + ((Real(FT_Level[FT_Index[0]])) x 5.00))
      • -------- ----------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Damage of the Fire Wave and the Damage over time is changeable in the Object Editor. (Flamethrower_Dummy) --------
      • -------- ----------------------------------------------------------------------------------------------------------------------------------------------- --------
[HIDDEN=''Flamethrower Loop]
  • Flamethrower Loop
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • For each (Integer FT_Index[2]) from 1 to FT_Index[0], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FT_Run_Trigger[FT_Index[2]] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • FT_Time[FT_Index[2]] Less than or equal to 0.00
                • Then - Actions
                  • Set FT_Index[1] = (FT_Index[1] - 1)
                  • Set FT_Run_Trigger[FT_Index[2]] = False
                  • Custom script: call RemoveLocation(udg_FT_Caster_Position_KB[udg_FT_Index[2]])
                  • Custom script: call DestroyGroup(udg_FT_Group[udg_FT_Index[2]])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • FT_Index[1] Equal to 0
                    • Then - Actions
                      • Set FT_Index[0] = 0
                      • -------- Turning the trigger off --------
                      • Trigger - Turn off Flamethrower Loop <gen>
                    • Else - Actions
                • Else - Actions
                  • Set FT_Angle = (Facing of FT_Caster[FT_Index[2]])
                  • Set FT_Caster_Position = (Position of FT_Caster[FT_Index[2]])
                  • Set FT_Flame_Point = (FT_Caster_Position offset by (Random real number between 100.00 and 350.00) towards (Random real number between (FT_Angle - 30.00) and (FT_Angle + 30.00)) degrees)
                  • Set FT_Flame_Group = (Units within 50.00 of FT_Flame_Point matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and (((Owner of FT_Caster[FT_Index[2]]) is an enemy of (O
                  • -------- Damaging the group affected by the little flames. --------
                  • Unit Group - Pick every unit in FT_Flame_Group and do (Actions)
                    • Loop - Actions
                      • Unit - Cause FT_Caster[FT_Index[2]] to damage (Picked unit), dealing FT_Flame_Damage[FT_Index[2]] damage of attack type Spells and damage type Normal
                  • Custom script: call DestroyGroup(udg_FT_Flame_Group)
                  • Special Effect - Create a special effect at FT_Flame_Point using Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call RemoveLocation(udg_FT_Flame_Point)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • FT_Time_Intervale[FT_Index[2]] Less than or equal to 0.00
                    • Then - Actions
                      • -------- Sending the Big Flame Wave --------
                      • Custom script: call RemoveLocation(udg_FT_Caster_Position_KB[udg_FT_Index[2]])
                      • Custom script: call DestroyGroup(udg_FT_Group[udg_FT_Index[2]])
                      • Set FT_Group_Point = (FT_Caster_Position offset by 350.00 towards FT_Angle degrees)
                      • Set FT_Group[FT_Index[2]] = (Units within 200.00 of FT_Group_Point matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and (((Owner of FT_Caster[FT_Index[2]]) is an enemy of (
                      • Custom script: call RemoveLocation(udg_FT_Group_Point)
                      • Set FT_Order_Point = (FT_Caster_Position offset by 50.00 towards FT_Angle degrees)
                      • Unit - Create 1 Dummy for (Owner of FT_Caster[FT_Index[2]]) at FT_Caster_Position facing Default building facing degrees
                      • Unit - Add Flamethrower_dummy to (Last created unit)
                      • Unit - Set level of Flamethrower_dummy for (Last created unit) to FT_Level[FT_Index[2]]
                      • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire FT_Order_Point
                      • Unit - Add a 1.10 second Generic expiration timer to (Last created unit)
                      • Custom script: call RemoveLocation(udg_FT_Order_Point)
                      • Set FT_Caster_Position_KB[FT_Index[2]] = (Position of FT_Caster[FT_Index[2]])
                      • Set FT_Knockback_Speed[FT_Index[0]] = 60.00
                      • Set FT_Time_Intervale[FT_Index[2]] = 0.52
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • And - All (Conditions) are true
                            • Conditions
                              • FT_Time_Intervale[FT_Index[2]] Less than or equal to 0.44
                              • FT_Time_Intervale[FT_Index[2]] Greater than or equal to 0.20
                        • Then - Actions
                          • -------- Knockbacking units. --------
                          • Set FT_Knockback_Speed[FT_Index[2]] = (Power(FT_Knockback_Speed[FT_Index[2]], 0.90))
                          • Unit Group - Pick every unit in FT_Group[FT_Index[2]] and do (Actions)
                            • Loop - Actions
                              • Set FT_Picked_Unit = (Picked unit)
                              • Set FT_Custom_Value = (Custom value of FT_Picked_Unit)
                              • Set FT_KB_Point[FT_Custom_Value] = (Position of FT_Picked_Unit)
                              • Set FT_Angle_KB[FT_Custom_Value] = (Angle from FT_Caster_Position to FT_KB_Point[FT_Custom_Value])
                              • Set FT_X = ((X of FT_KB_Point[FT_Custom_Value]) + (FT_Knockback_Speed[FT_Index[2]] x (Cos(FT_Angle_KB[FT_Custom_Value]))))
                              • Set FT_Y = ((Y of FT_KB_Point[FT_Custom_Value]) + (FT_Knockback_Speed[FT_Index[2]] x (Sin(FT_Angle_KB[FT_Custom_Value]))))
                              • Set FT_XY_Point[FT_Custom_Value] = (Point(FT_X, FT_Y))
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Terrain pathing at FT_XY_Point[FT_Custom_Value] of type Walkability is off) Equal to True
                                • Then - Actions
                                • Else - Actions
                                  • Custom script: call SetUnitX(udg_FT_Picked_Unit, udg_FT_X)
                                  • Custom script: call SetUnitY(udg_FT_Picked_Unit, udg_FT_Y)
                              • Custom script: call RemoveLocation(udg_FT_XY_Point[udg_FT_Custom_Value])
                              • Custom script: call RemoveLocation(udg_FT_KB_Point[udg_FT_Custom_Value])
                        • Else - Actions
                  • -------- ----------------------------------------------------------------------------------------------------------------------------------------------- --------
                  • Set FT_Time[FT_Index[2]] = (FT_Time[FT_Index[2]] - 0.04)
                  • Set FT_Time_Intervale[FT_Index[2]] = (FT_Time_Intervale[FT_Index[2]] - 0.04)
                  • Custom script: call RemoveLocation(udg_FT_Caster_Position)
            • Else - Actions
[/HIDDEN]

Keywords:
Flamethrower, Flamme, Flame, Fire, Fire Lord.
Contents

Flamethrower (Map)

Reviews
17:56, 7th Dec 2009 TriggerHappy: Review for Flamethrower The spell was pretty neat, but a little laggy upon cast. Also, is it only supposed to knockback units that are farther away? Anyways, it's decent enough. Status...

Moderator

M

Moderator

17:56, 7th Dec 2009
TriggerHappy:


Review for Flamethrower

The spell was pretty neat, but a little laggy upon cast.
Also, is it only supposed to knockback units that are farther away?

Anyways, it's decent enough.

Status

Approved
 
Level 7
Joined
Nov 6, 2009
Messages
279
testing

EDIT: weird but i think it functions normally and has no leaks but do u really need these lines
  • Custom script: call RemoveLocation(udg_FT_Order_Point)
  • Custom script: call RemoveLocation(udg_FT_Casting_Point)
in the first trigger?
 
Level 4
Joined
Nov 8, 2009
Messages
25
Hehe nice idea ;) ,

haven´t really checked code until now but i saw that you use call SetUnitX and call SetUnitY, of course these are nice functions but you have to keep in mind that they don´t check terrain pathing which mean units can be moved to positions where they can´t move for example on cliffs.

You should add an If/then/else function which checks if the new position is pathable before they get moved.

~BlackHawk
 
Hehe nice idea ;) ,

haven´t really checked code until now but i saw that you use call SetUnitX and call SetUnitY, of course these are nice functions but you have to keep in mind that they don´t check terrain pathing which mean units can be moved to positions where they can´t move for example on cliffs.

You should add an If/then/else function which checks if the new position is pathable before they get moved.

~BlackHawk

imho won't work for doodads

a good way to check the pathing properly is to
-hide all items around the target coords
-move 2 items to the target coord
-check if the first item got moved where you wanted it to
-check if the second item got bashed away from these coords
if that is true the coords are pathable

and you should also check if the coords are within the playable map area
units outside of the map will cause lag and probably disc or smthn

seems to be a good spell
didn't check the code properly though
 
Level 4
Joined
Nov 8, 2009
Messages
25
D4RK_G4ND4LF said:
imho won't work for doodads

a good way to check the pathing properly is to
-hide all items around the target coords
-move 2 items to the target coord
-check if the first item got moved where you wanted it to
-check if the second item got bashed away from these coords
if that is true the coords are pathable

Ah yes thats true, but i don´t think that it is that dangerous because doodads like a building or an obelisk counts as not pathable and when a tree stands on the position your unit gets ported beneath it when it moves next time.

But nevertheless you are right it could be tricky in some cases.
 
kola said:
i think it would lag more than it would be usefull.
so i might no make it

I said MOVE
not create
of cause this would lag....

there is a fancy jass function to do it of cause

JASS:
call SetItemPosition( udg_pathitem, udg_x, udg_y )

Youve reinvented knocking units back for the hundredth time. Use an external library for that.
Also, youre destroying groups and using locations.

using a knockback system would be the easiest way (however most gui knockback systems around here suck 'cause they don't use SetUnitX/Y or the item path check so you could also make your own if you really want to)
 
Top