Spell Meteor

waaaks!

Zinctified
Reaction score
255
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
255
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
255
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
255
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
255
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
255
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.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top