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
Code
EDIT 1: Optimized the code
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
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 039;A000039; //Meteor Spell Id
endfunction
constant function Meteor_Dummy_Spell takes nothing returns integer
return 039;A001039; //Meteor Trail Spell Id
endfunction
constant function Meteor_Explosion takes nothing returns integer
return 039;A003039; //Explosion Damage Spell Id
endfunction
constant function Meteor_Unit takes nothing returns integer
return 039;h002039; //Meteor Unit Id
endfunction
constant function Meteor_Dummy takes nothing returns integer
return 039;h001039; //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, 039;BTLF039;, 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, 039;BTLF039;, 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