• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Fire Wall 1.01

Requires:
JassNewGenPack
TimerUtils
List
TimedBuffEffects (only in the test map)

Credits:
All the JNGP guys
Vexorian (TimerUtils)
MaskedPoptart (List, TimedBuffEffects)

Inspired by the spell from Diablo 2.

Description:
This is a pretty simple vJASS spell. You cast it on a point or a unit, and it will create a wall of flame perpendicular to you. These flames periodically damage nearby units. The flames will die out after their duration is up.

Importing/Setup:
To import the spell, copy paste the "Fire Wall" and "Other Libraries" folders into your map. Copy the ability from the object editor, or make your own. Finally, go to the top of the Firewall trigger and make sure the SPELL_ID matches the rawcode of the ability you just made. To configure the spell, go to the Firewall trigger and look in the Setup Section for the stuff you want to change.

Other stuff
This spell is compatible with wc3 tft v1.24b. There are no known bugs, leaks, or inefficient things.

Anyway,
Enjoy. :)

Updated to FireWall v1.01
- can now damage destructibles! You decide what types of destructibles are valid to damage in the IsValidDestTarget function, just as you decide which types of units are valid in the IsValidUnitTarget function. Remember you can make structures and magic immune units valid targets... it's up to you.

- units that are in range now get an attached effect identical to the one caused by the red immolation ability. I created a separate library to allow me to do this without using dummies, dummy abilities, or actual buffs (I hate making people import all that extra object editor crap). See the TimedBuffEffects library for more info.

- fixed the inefficient things mentioned by hvo-busterkomo (couldn't find the wall system he was talking about though)

Keywords:
Fire, Wall, Flame, Burn, Burning, Hot, Sexy, Ownage, Diablo 2, Sorceress
Contents

Just another Warcraft III map (Map)

Reviews
20:18, 29th Aug 2009 hvo-busterkomo: The spell is decent (approved), but should try to avoid useless conversions. You can easilly avoid all of the R2I calls by modifying a few of the functions. You also use local variables in the Actions function...

Moderator

M

Moderator

20:18, 29th Aug 2009
hvo-busterkomo:
The spell is decent (approved), but should try to avoid useless conversions. You can easilly avoid all of the R2I calls by modifying a few of the functions. You also use local variables in the Actions function when you can just use the values directly into the create method. Isn't their a script at WC3C that is used to easily create wall spells?
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
Now that is some bitch-ass piece of code!
The first thing that caught my attention is the list. Anyone else would have used a 'Flame array' if you know what i mean. The code seems really good and certainly like a maskedpoptart-code. But the thing that i was amazed by is how you managed to NOT use any angle/sine/cosine calculation!
Well besides that i saw no flaws in the code. And i looked through it quite thoroughly.

Though my upper fella's are kinda right, the spell is easy and could have been done in GUI (though that lacks efficiency and i more like to look through (v)Jass than GUI), this spell could NEVER have been done more maskpoptart-ish! =D

Great job! ^^

EDIT:
Could you try to teach me how to not use angles but your calculations instead? Because it looks Way more efficient to me this way!
Yes of course i can copy your equotations but that doesnt teach me the fine things of the logic behind it, which is what really intrigued me about it!
 
Level 8
Joined
Aug 4, 2006
Messages
357
EoW, in this case, using vectors makes more sense and is a little more efficient than using polar. If you used polar, you would have to use Atan2 to get the angle between the caster and target. You convert rectangular coordinates to polar. After adding pi/2 to make it perpendicular, you would have to convert the polar coordinates back into rectangular by doing Cos(angle) and Sin(angle). Each individual trig operation is slower than SquareRoot. When combined, the trig operations are at least three times slower than finding the SquareRoot. Considering we only have to call these functions once, using vectors won't make any noticable difference in speed. It just makes more sense to use.
 
Cosine and sine and all that aren't... well how can I explain that in a simple way... well they're like BJs in Jass :p
They've got certain calculations behind them, so they are avoidable ;)
What maskedpoptart did wasn't to write his own way of finding the sine/cosine. He just used a different way of finding a perpendicular line.

EoW, in this case, using vectors makes more sense and is a little more efficient than using polar. If you used polar, you would have to use Atan2 to get the angle between the caster and target. You convert rectangular coordinates to polar. After adding pi/2 to make it perpendicular, you would have to convert the polar coordinates back into rectangular by doing Cos(angle) and Sin(angle). Each individual trig operation is slower than SquareRoot. When combined, the trig operations are at least three times slower than finding the SquareRoot. Considering we only have to call these functions once, using vectors won't make any noticable difference in speed. It just makes more sense to use.
Yeah, I guess it makes sense, but in most situations where it'd give you any efficiency gain, it'd be useless using vectors anyway as you probably have to recalculate the angle every 0.035 seconds.
 
Level 8
Joined
Aug 4, 2006
Messages
357
Yeah, I guess it makes sense, but in most situations where it'd give you any efficiency gain, it'd be useless using vectors anyway as you probably have to recalculate the angle every 0.035 seconds.
You are right to a certain extent. There are situations where you have to use polar and it is useless to convert it to vectors, such as making something move in a circular path. There are other situations where you could use polar, but it would be quite a bit less efficient than using vectors, such as collisions.
 
Good

This is a good map :goblin_boom:
  • //TESH.scrollpos=0
  • //TESH.alwaysfold=0
  • function Trig_Melee_Initialization_Actions takes nothing returns nothing
    • call FogEnable(false)
    • call FogMaskEnable(false)
  • endfunction
  • //===========================================================================
  • function InitTrig_Melee_Initialization takes nothing returns nothing
    • set gg_trg_Melee_Initialization = CreateTrigger( )
    • call TriggerAddAction( gg_trg_Melee_Initialization, function Trig_Melee_Initialization_Actions )
  • endfunction
:spell_breaker: :infl_thumbs_up:
 
Top