Spell Flamethrower

Arcane

You can change this now in User CP.
Reaction score
87
Yet another attempt at a JASS spell, and yet another initial failure. Things are just so much easier in GUI right now... sigh... Will be converting this to JASS eventually.

The Pandaren Brewmaster conjures up a stream of searing hot flames which spread outwards in a cone shape. The flames deal (15+15*level) damage per second and last for 5 seconds. The flames also slow enemy units by 50% for 2 seconds.

This spell is GUI for now.
NOT MUI.


Here is the code:
Code:
Flamethrower Initialize
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Flamethrower 
    Actions
        Set FlameCaster = (Triggering unit)
        Set FlameCasterPoint = ((Position of (Triggering unit)) offset by 50.00 towards (Facing of (Triggering unit)) degrees)
        Set FlamethrowerGroup = FlamethrowerGroup
        Set FlameDamageGroup = FlameDamageGroup
        Trigger - Turn on Periodic <gen>
        Wait 0.65 seconds
        Animation - Change (Triggering unit)'s animation speed to 0.00% of its original speed

Code:
Flamethrower Halt
    Events
        Unit - A unit Stops casting an ability
    Conditions
        (Ability being cast) Equal to Flamethrower 
    Actions
        Animation - Change (Triggering unit)'s animation speed to 100.00% of its original speed
        Animation - Reset (Triggering unit)'s animation
        Unit Group - Pick every unit in FlamethrowerGroup and do (Actions)
            Loop - Actions
                Unit - Kill (Picked unit)
        Trigger - Turn off Periodic <gen>
        Custom script:   call RemoveLocation(udg_FlameCasterPoint)

Code:
Periodic
    Events
        Time - Every 0.1 seconds of game time
    Conditions
    Actions
        Unit - Create 1 Flame for (Owner of FlameCaster) at FlameCasterPoint facing ((Facing of FlameCaster) - (Random real number between -30.00 and 30.00)) degrees
        Unit Group - Add (Last created unit) to FlamethrowerGroup
        Unit Group - Pick every unit in FlamethrowerGroup and do (Actions)
            Loop - Actions
                Set FlamePoint = (Position of (Picked unit))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Integer((Distance between FlameCasterPoint and FlamePoint))) Greater than 500
                    Then - Actions
                        Unit - Kill (Picked unit)
                        Custom script:   call RemoveLocation(udg_FlamePoint)
                    Else - Actions
                        Unit Group - Pick every unit in (Units within 100.00 of FlamePoint matching ((((Matching unit) belongs to an enemy of (Owner of FlameCaster)) Equal to True) and (((Matching unit) is alive) Equal to True))) and do (Actions)
                            Loop - Actions
                                Unit Group - Add (Picked unit) to FlameDamageGroup
                        Unit - Move (Picked unit) instantly to (FlamePoint offset by 30.00 towards (Facing of (Picked unit)) degrees)
                        Custom script:   call RemoveLocation(udg_FlamePoint)
        Unit Group - Pick every unit in FlameDamageGroup and do (Actions)
            Loop - Actions
                Unit - Cause FlameCaster to damage (Picked unit), dealing (0.75 + (0.75 x (Real((Level of Flamethrower  for FlameCaster))))) damage of attack type Spells and damage type Fire
                Unit - Create 1 Dumbo for (Owner of FlameCaster) at FlameCasterPoint facing Default building facing degrees
                Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
                Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
                Unit Group - Remove (Picked unit) from FlameDamageGroup


Say, if I made this spell in JASS, would it require "moving locals" from one function to another?
 

Attachments

  • Flamethrower.jpg
    Flamethrower.jpg
    210.8 KB · Views: 333
  • Flamethrower.w3x
    58.5 KB · Views: 238

Trollvottel

never aging title
Reaction score
262
>Say, if I made this spell in JASS, would it require "moving locals" from one function to another?

yes youd have to attach them to a timer
 

Arcane

You can change this now in User CP.
Reaction score
87
It's up now. :p
I noticed something was missing a second after I posted it.
There's so much to put in submission posts, now I can understand why so many people forget.
 

Arcane

You can change this now in User CP.
Reaction score
87
Is that really bad?
It doesn't lag at all for me...

Edit: Meh, I gotta go, maybe I'll lower the "X per second" later to prevent lag.

Fixed - or not.
I changed the "every 0.05 seconds" to "every 0.1 seconds", and because that made the flames move fairly slowly, I altered the distance moved per X to 30.

I don't know how much that did to reduce lag, since it never lagged on my computer, but I did add a note at the bottom of the readme to remind people that both values - the distance and the "every X seconds" are changeable depending on your preferences.
 

Arcane

You can change this now in User CP.
Reaction score
87
Ah... damn. Still drops by a lot. Oh well, not something I can fix I guess?
 

emjlr3

Change can be a good thing
Reaction score
395
this is exactly fire breath cast over and over, except it lags a lot
 

Arcane

You can change this now in User CP.
Reaction score
87
o_O

No it's not. It's a lot of dummy units (with some fiery model) being moved outwards in a cone shape...

Not that it makes things a lot better, but still.
 

The Undaddy

Creating with the power of rage
Reaction score
55
Maybe it's the "alot of units" that lags.I recommend that you change the death type to "Can't raise,does not decay",'cause I see its "does decay" atm.Nice spell btw :p
 

emjlr3

Change can be a good thing
Reaction score
395
o_O

No it's not. It's a lot of dummy units (with some fiery model) being moved outwards in a cone shape...

Not that it makes things a lot better, but still.

you missed my point entirely

this is a flawed concept, IMO
 

Arcane

You can change this now in User CP.
Reaction score
87
@The Undaddy: What's the difference...?

@emjlr3: Oh well, I didn't start making it thinking it would be the best spell ever. The original idea was to practice JASS (which failed horribly), and making it in GUI and submitting it here was almost an afterthought.
 

Insane!

Shh I didn't edit this, go away.
Reaction score
122
Code:
Set FlameCasterPoint = ((Position of (FlameCaster)) offset by 50.00 towards (Facing of (FlameCaster)) degrees)

fix your code to the code above
 

Sim

Forum Administrator
Staff member
Reaction score
534
This is just a gigantic Breath of Fire... :eek:

The spell only lags on the first cast.

> Unit Group - Pick every unit in (Units within 100.00 of FlamePoint matching ((((Matching unit) belongs to an enemy of (Owner of FlameCaster)) Equal to True) and (((Matching unit) is alive) Equal to True))) and do (Actions)

This leaks.

> Unit - Move (Picked unit) instantly to (FlamePoint offset by 30.00 towards (Facing of (Picked unit)) degrees)

Leak

By pre-loading the "Flame" unit I reduced the lag at the beginning of the spell. Unfortunately, there is still a one-time lag when the spell ends. As soon as the spell is cast again, it doesn't lag again for me.
 

Miz

Administrator
Reaction score
428
It doesn't seem laggy to me, except the 1st time I ever casted it. But I am afraid that it will lag for other people. If you could fix that I would totally use it XD

I could try to fix it but sometimes I redo the entire trigger on acident
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top