Spell Meteor

waaaks!

Zinctified
Reaction score
256
Not really a meteor that falls to the ground, I can't think of a new spell to be created, due to many members here already made the spells i want to make, anyways heres the spell.

The spell has lots of object editor stuffs to avoid trigger errors, yeah and sometimes the meteor dodges because of the terrain, even if the unit i used has the fly movement type

The spell is very simple for other spell makers, i just make a unit move to the target location and doing some special effects

I hope you like the spell

JASS
MUI
MPI
Leakless
Requires nothing

Meteor
Calls a Meteor that strikes towards the target location, dealing 50 damage to enemy units that collides with the meteor, leaving trails of fire that deals damage per second, and dealing damage to enemy units when exploding.


Level 1 - 20 damage per second, 50 explosion damage
Level 2 - 30 damage per second, 100 explosion damage
Level 1 - 40 damage per second, 150 explosion damage
Level 1 - 50 damage per second, 200 explosion damage

Screenies
Meteor.jpg
Code
JASS:
//**************************************************
//* Meteor
//*     by waaaks!
//**************************************************
//* How to Import?
//*     Copy the following abilities to your map
//*         Explosion Damage
//*         Meteor Collision
//*         Meteor
//*         Meteor Trail
//*     Copy the following unit to your map
//*         Meteor
//*     Copy the following trigger to your map
//*         Meteor
//**************************************************
//* Object Editor Configuration
//*     All abilities and damage can be configured
//*     inside the Object Editor
//**************************************************
//* Trigger Configuration
//*     You need to change the raw codes of the
//*     spells in your map to the exact spells used
//*
//*     Other than the raw codes, its better to leave
//*     the trigger's configuration
//**************************************************

constant function Meteor_Spell takes nothing returns integer
 return 'A000' //Meteor Spell Id
endfunction

constant function Meteor_Dummy_Spell takes nothing returns integer
 return 'A001' //Meteor Trail Spell Id
endfunction

constant function Meteor_Explosion takes nothing returns integer
 return 'A003' //Explosion Damage Spell Id
endfunction

constant function Meteor_Unit takes nothing returns integer
 return 'h002' //Meteor Unit Id
endfunction

constant function Meteor_Dummy takes nothing returns integer
 return 'h001' //Dummy Unit Id
endfunction

constant function Meteor_Speed takes nothing returns real
 return 522.0 //Meteor Dummy unit's exact movement speed
endfunction

constant function Meteor_Range takes nothing returns real
 return 2000.0 //Distance traveled by the Meteor
endfunction

constant function Meteor_Gap takes nothing returns real
 return 200.0 //Gap between each flame strike casted
endfunction

function Trig_Meteor_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == Meteor_Spell()
endfunction

function Trig_Meteor_Actions takes nothing returns nothing
 local unit cast = GetTriggerUnit()
 local real cx = GetUnitX(cast)
 local real cy = GetUnitY(cast)
 local location targ = GetSpellTargetLoc()
 local real angle = bj_RADTODEG * Atan2(GetLocationY(targ) - cy, GetLocationX(targ) - cx)
 local real dx = cx + Meteor_Range() * Cos(angle * bj_DEGTORAD)
 local real dy = cy + Meteor_Range() * Sin(angle * bj_DEGTORAD)
 local location pol = Location(dx, dy)
 local location pol2 = null
 local real wait = Meteor_Range() / Meteor_Speed()
 local integer n = 0
 local integer l = GetUnitAbilityLevel(cast, Meteor_Spell())
 local unit d = null
 local unit m = null
 local real px = 0
 local real py = 0 
 set d = CreateUnit(GetOwningPlayer(cast), Meteor_Unit(), cx, cy, angle)
 call UnitAddAbility(d, Meteor_Explosion())
 call SetUnitAbilityLevel(d, Meteor_Explosion(), l)
 call UnitApplyTimedLife(d, 'BTLF', wait + 0.5)
 call IssuePointOrderLoc(d, "move", pol)
 loop
  exitwhen n >= Meteor_Range() / Meteor_Gap()
  set px = cx + Meteor_Gap() * n * Cos(angle * bj_DEGTORAD)
  set py = cy + Meteor_Gap() * n * Sin(angle * bj_DEGTORAD)
  set pol2 = Location(px, py)
  set n = n + 1
  set m = CreateUnit(GetOwningPlayer(cast), Meteor_Dummy(), GetUnitX(cast), GetUnitY(cast), angle)
  call UnitAddAbility(m, Meteor_Dummy_Spell())
  call SetUnitAbilityLevel(m, Meteor_Dummy_Spell(), l)
  call UnitApplyTimedLife(m, 'BTLF', 4)
  call IssuePointOrderLoc(m, "flamestrike", pol2)
  call RemoveLocation(pol2)
  call PolledWait(0.30)
 endloop
 call RemoveLocation(targ)
 call RemoveLocation(pol)
 set targ = null
 set pol = null
 set pol2 = null
 set cast = null
 set d = null
 set m = null
endfunction

//===========================================================================
function InitTrig_Meteor takes nothing returns nothing
    set gg_trg_Meteor = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Meteor, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Meteor, Condition( function Trig_Meteor_Conditions ) )
    call TriggerAddAction( gg_trg_Meteor, function Trig_Meteor_Actions )
endfunction

EDIT 1: Optimized the code
 

cr4xzZz

Also known as azwraith_ftL.
Reaction score
51
> set pol2 = PolarProjectionBJ(loc, Meteor_Gap()*n, angle)
=>
JASS:
    local real x = GetLocationX(loc) + Meteor_Gap()*n * Cos(angle * bj_DEGTORAD)
    local real y = GetLocationY(loc) + Meteor_Gap()*n * Sin(angle * bj_DEGTORAD)
    set pol2 = Location(x, y)

-------
local real angle = AngleBetweenPoints(loc, targ)
=>
JASS:
local real angle = bj_RADTODEG * Atan2(GetLocationY(loc) - GetLocationY(targ), GetLocationX(loc) - GetLocationX(targ)

I think there was an easier way for this but I can't remember it right now...
--------
> local location pol2 = null
You could just leave it local location pol2 without the null
--------
> local location pol = PolarProjectionBJ(loc, Meteor_Range(), angle)

Same as the first one
--------
> set gg_trg_Meteor = CreateTrigger( )
Why not make it local trigger t = CreateTrigger() and use it for the event, action and condition?

Other than that, this spell is really sweet I think I'll use it in my map for my Infernal Hero :)
 

0zaru

Learning vJASS ;)
Reaction score
60
Yes, use radians instead of Degrees.

It's the same with a local trigger or a global... It's just shortened coded... //In the inittrig

You should use points instead of locations (Check the functions that you use (PolarProjectionBJ, AngleBetweenPoints))
 

waaaks!

Zinctified
Reaction score
256
i forgot to change them, because im really not familliar to reals especially in polarprojection, angle, and distance

I promise i will not be lazy
ill optimize the spell and code tomorrow
 

waaaks!

Zinctified
Reaction score
256
finish updating the spells
removed those nasty bjs

lol
no moderators visited this thread, not even posted a requirements for approving this?
ive got 2 spells already not visited by mods, and not telling me on what are the requirements for approval

first is the spell with the pitlord hero, and second is this
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
Hmm, you have wierd indenting method? 2 spaces instead of 1 tab?

And, why uses PollWait inside a loop, use timer instead?
 

waaaks!

Zinctified
Reaction score
256
i think polled wait is faster, and i dont know how to use timers, to replace polled wait too :p
 

GoGo-Boy

You can change this now in User CP
Reaction score
40
One question, how to you use the flame strikes without showing the pillar of flames?
 

sjakie

Cookie Be Awesome!
Reaction score
127
One question, how to you use the flame strikes without showing the pillar of flames?

The pillar of flame and the little flames are 2 different things.
He can choose to only show the little flames if he wants.


BTW: Nice spell indeed, did you steal the spell from DotA, or did DotA take the spell idea from you? (to lazy to check the DotA credits :D)
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
DotA's Invoker had existed since 6.10-6.12, which is years ago, so it couldn't be.
Anyway Invoker's Meteor is different from this one as this one deals collision damage and deals damage overtime over an area, where Invoker's meteor doesn't deal collision damage and deals damage overtime on units hit by the Meteor.

waaaks!'s Meteor simply orders a unit to move as the meteor, while dummies cast Flame Strike on certain points after Waits.
Invoker's Meteor also orders a unit to move as the meteor, but the dummies cast some-area-spell when the Meteor walks over certain points.

That is to say, even if waaaks!'s Meteor's movement is interrupted, the Flame Strikes will still continue to strike, but if Invoker's Meteor's movement is interrupted, the whole spell is over.

Sorry, just explaining the difference between this Meteor and that Meteor :)
 

sjakie

Cookie Be Awesome!
Reaction score
127
Well...I was more talking about the idea, and not the details about how they are made:rolleyes:
But as far as I can make up from your post the invokers meteor is older, making that meteor the original one I gues.
 

cr4xzZz

Also known as azwraith_ftL.
Reaction score
51
> But as far as I can make up from your post the invokers meteor is older, making that meteor the original one I gues.
Who cares who stole it from who and which one is the original? Why does everything that looks like a dota spell should be a dota spell? In my opinion this is much better than the new Invoker's meteor..
Btw as said above you should use timers instead of loops :)
 

waaaks!

Zinctified
Reaction score
256
i stealed the idea from dota, i tried making the original meteor spell, but i cant get it, i dont know why, like structs always doesnt work for me, making all of my spells a bit of old coded
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
> Who cares who stole it from who?
> Nice spell indeed, did you steal the spell from DotA, or did DotA take the spell idea from you?

He asked it :rolleyes:
 

waaaks!

Zinctified
Reaction score
256
so no more comments?
so...again, what are the requirements to approve the spell...or how long should i wait to make the spell approved?
 

Astal

New Member
Reaction score
1
Not really a meteor that falls to the ground, I can't think of a new spell to be created, due to many members here already made the spells i want to make, anyways heres the spell.

The spell has lots of object editor stuffs to avoid trigger errors, yeah and sometimes the meteor dodges because of the terrain, even if the unit i used has the fly movement type

The spell is very simple for other spell makers, i just make a unit move to the target location and doing some special effects

I hope you like the spell

JASS
MUI
MPI
Leakless
Requires nothing

Meteor
Calls a Meteor that strikes towards the target location, dealing 50 damage to enemy units that collides with the meteor, leaving trails of fire that deals damage per second, and dealing damage to enemy units when exploding.


Level 1 - 20 damage per second, 50 explosion damage
Level 2 - 30 damage per second, 100 explosion damage
Level 1 - 40 damage per second, 150 explosion damage
Level 1 - 50 damage per second, 200 explosion damage

Screenies
Meteor.jpg
Code
JASS:
//**************************************************
//* Meteor
//*     by waaaks!
//**************************************************
//* How to Import?
//*     Copy the following abilities to your map
//*         Explosion Damage
//*         Meteor Collision
//*         Meteor
//*         Meteor Trail
//*     Copy the following unit to your map
//*         Meteor
//*     Copy the following trigger to your map
//*         Meteor
//**************************************************
//* Object Editor Configuration
//*     All abilities and damage can be configured
//*     inside the Object Editor
//**************************************************
//* Trigger Configuration
//*     You need to change the raw codes of the
//*     spells in your map to the exact spells used
//*
//*     Other than the raw codes, its better to leave
//*     the trigger's configuration
//**************************************************

constant function Meteor_Spell takes nothing returns integer
 return 'A000' //Meteor Spell Id
endfunction

constant function Meteor_Dummy_Spell takes nothing returns integer
 return 'A001' //Meteor Trail Spell Id
endfunction

constant function Meteor_Explosion takes nothing returns integer
 return 'A003' //Explosion Damage Spell Id
endfunction

constant function Meteor_Unit takes nothing returns integer
 return 'h002' //Meteor Unit Id
endfunction

constant function Meteor_Dummy takes nothing returns integer
 return 'h001' //Dummy Unit Id
endfunction

constant function Meteor_Speed takes nothing returns real
 return 522.0 //Meteor Dummy unit's exact movement speed
endfunction

constant function Meteor_Range takes nothing returns real
 return 2000.0 //Distance traveled by the Meteor
endfunction

constant function Meteor_Gap takes nothing returns real
 return 200.0 //Gap between each flame strike casted
endfunction

function Trig_Meteor_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == Meteor_Spell()
endfunction

function Trig_Meteor_Actions takes nothing returns nothing
 local unit cast = GetTriggerUnit()
 local real cx = GetUnitX(cast)
 local real cy = GetUnitY(cast)
 local location targ = GetSpellTargetLoc()
 local real angle = bj_RADTODEG * Atan2(GetLocationY(targ) - cy, GetLocationX(targ) - cx)
 local real dx = cx + Meteor_Range() * Cos(angle * bj_DEGTORAD)
 local real dy = cy + Meteor_Range() * Sin(angle * bj_DEGTORAD)
 local location pol = Location(dx, dy)
 local location pol2 = null
 local real wait = Meteor_Range() / Meteor_Speed()
 local integer n = 0
 local integer l = GetUnitAbilityLevel(cast, Meteor_Spell())
 local unit d = null
 local unit m = null
 local real px = 0
 local real py = 0 
 set d = CreateUnit(GetOwningPlayer(cast), Meteor_Unit(), cx, cy, angle)
 call UnitAddAbility(d, Meteor_Explosion())
 call SetUnitAbilityLevel(d, Meteor_Explosion(), l)
 call UnitApplyTimedLife(d, 'BTLF', wait + 0.5)
 call IssuePointOrderLoc(d, "move", pol)
 loop
  exitwhen n >= Meteor_Range() / Meteor_Gap()
  set px = cx + Meteor_Gap() * n * Cos(angle * bj_DEGTORAD)
  set py = cy + Meteor_Gap() * n * Sin(angle * bj_DEGTORAD)
  set pol2 = Location(px, py)
  set n = n + 1
  set m = CreateUnit(GetOwningPlayer(cast), Meteor_Dummy(), GetUnitX(cast), GetUnitY(cast), angle)
  call UnitAddAbility(m, Meteor_Dummy_Spell())
  call SetUnitAbilityLevel(m, Meteor_Dummy_Spell(), l)
  call UnitApplyTimedLife(m, 'BTLF', 4)
  call IssuePointOrderLoc(m, "flamestrike", pol2)
  call RemoveLocation(pol2)
  call PolledWait(0.30)
 endloop
 call RemoveLocation(targ)
 call RemoveLocation(pol)
 set targ = null
 set pol = null
 set pol2 = null
 set cast = null
 set d = null
 set m = null
endfunction

//===========================================================================
function InitTrig_Meteor takes nothing returns nothing
    set gg_trg_Meteor = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Meteor, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Meteor, Condition( function Trig_Meteor_Conditions ) )
    call TriggerAddAction( gg_trg_Meteor, function Trig_Meteor_Actions )
endfunction

EDIT 1: Optimized the code

Is It Possible To Edit this to make the meteor explode as soon as it hits and also leave a crater effect in the ground?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top