Spell Flamethrower

Arcane

You can change this now in User CP.
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

Trollvottel

never aging title
>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.
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.
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.
Ah... damn. Still drops by a lot. Oh well, not something I can fix I guess?
 

emjlr3

Change can be a good thing
Staff member
this is exactly fire breath cast over and over, except it lags a lot
 

Arcane

You can change this now in User CP.
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
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
Staff member
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.
@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.
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
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
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 The Helper:
    check out this place apparently it is the best roommate site out there roommates.com lol
  • Varine Varine:
    The homeless people reminded me of New York
  • Varine Varine:
    I'll check it out, my lease expires in like a few months so I need to figure something out.
  • Varine Varine:
    I tried to open a food truck in Sandpoint a few years ago but the city said no, then like two years later they passed new laws to encourage it and gave them all fucking tax breaks and shit. And at that point I didn't have enough money to go buy one so I was way too late to the game once other cities realized they could just bring their existing truck there, or sell their brick and mortar.
  • Varine Varine:
    I do like food trucks though, they're way more fun than restaurants and usually I also get some of that tip money there.
  • Varine Varine:
    Restaurants are really hard if you don't have a back up source of income to fund them sometimes, in my experience most owners either got really really lucky, had existing money that allowed them to buy an already successful one, or they have family money to fall back on for loans. It's few and far between to see very inspiring success stories where the person actually got it through hard work and perseverance. I thought about opening one lots and I always just end up not thinking it'll work. I would much rather just find someone that has that money and go work for them
  • The Helper The Helper:
    i am not talking about opening a brick and mortar I am talking about food trucks though I have seen some brick and mortar mexican places open up during covid that are doing good because there food is awesome!
  • The Helper The Helper:
    Food trucks are killing out here because Bars cannot open unless they sell food and the governor ok'd the use of a food truck in front as serving food
  • The Helper The Helper:
    Just not enough food trucks
  • The Helper The Helper:
    a buddy of mine just opened up a food truck and he is killing it but he is a great cook and has awesome food right in the middle of the pandemic too food trucks are immune to pandemic because they are take out in Texas you will always be able to get take out or delivery
  • The Helper The Helper:
    He is in the different food facebook groups in houston and posts videos of him making his food
  • The Helper The Helper:
    he is killing it
  • jonas jonas:
    @Varine with the restaurants, there surely is a lot of luck and hard work but most restaurants fail because they suck. Flair isn't right, economics not well thought through, food is mediocre or sucks, location is bad, etc. If you're thinking about opening one, make sure you're looking at the stories of those that would be playing at your level, don't let your hopes be dragged down by all the subpar restaurants out there.
  • jonas jonas:
    I'm a bit worried about the future of data science, there's an influx of incompetent people hired by incompetent managers, that can't last. But I'm sure smart data scientists will always be useful and hireable. Same as smart security people.
  • jonas jonas:
    My sister in law worked in a vegan food truck, the owners were also making a killing, added several trucks and opened two restaurants over 5 years
  • Ghan Ghan:
    The CompTIA stuff is pretty much crap unfortunately. The places that ask for those low-level certs aren't likely places you want to work. For IT you really want a degree, but in the meantime you need to figure out some way to learn the skills. Cybersecurity is really hot right now so competition is fierce.
  • tom_mai78101 tom_mai78101:
    I realized I don't have anything much to say, other than "Good luck!". Compared to other places, I'm just very lucky we didn't have a lot of surges of cases coming in.
  • The Helper The Helper:
    My daughter just got back from school at Georgetown TX, outside of Austin and said there were 100 cases in the last week but she also said nobody was wearing a mask anywhere so people mask up and stay safe!
    +2
  • thewrongvine thewrongvine:
    happy thanksgiving folks!
    +1
  • Ralle Ralle:
    PLOOB
  • Varine Varine:
    @Gyah Yeah I figured they aren't particularly valuable, but they'll at the least act as a baseline for some entry level work somewhere.
  • Varine Varine:
    I now see how horribly I spelled @Ghan
  • Varine Varine:
    I had a rough morning
  • The Helper The Helper:
    that field is going to explode and though there is competition there is going to be room for all levels in the coming years imho.
  • tom_mai78101 tom_mai78101:
    Why are we competing for rough mornings? :(

    Members online

    Affiliates

    Hive Workshop
    Top