Doom-Angel
Jass User (Just started using NewGen)
- Reaction score
- 167
k so i finnaly finished the skill completely tell me what you think about it:
Level 1: 25 Energy balls.
Level 2: 50 Energy balls.
Level 3: 75 Energy balls.
Leakless: im pretty sure it is if not correct me.
MUI: yes.
Jass: yes.
Pictures: (i hope they came out good)
this is how it starts:
this is how it finish: (pretty much...)
it's pretty hard to see what happens so seeing it ingame would be a lot better.
as some of you might have noticed this skill is supposed to reflect what piccolo does to 17 in this video: (watch from -0:30)
[YOUTUBE]9tQ60LnGcCM[/YOUTUBE]
and here's the trigger:
i hope it's approved
the map is attached below have.
~Have Fun~
Scatter Shot
Description:Creates many energy balls around the target and then throw them all at once each ball causes 40 damage. Level 1: 25 Energy balls.
Level 2: 50 Energy balls.
Level 3: 75 Energy balls.
Leakless: im pretty sure it is if not correct me.
MUI: yes.
Jass: yes.
Pictures: (i hope they came out good)
this is how it starts:
as some of you might have noticed this skill is supposed to reflect what piccolo does to 17 in this video: (watch from -0:30)
[YOUTUBE]9tQ60LnGcCM[/YOUTUBE]
and here's the trigger:
JASS:
//@@@@@@@@@@@@@@@@@@@@@@@@@ [Spell] Scatter Shot @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@ Made by Doom-Angel @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ~~Have Fun~~ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@ Implementation Instructions @@@@@@@@@@@@@@@@@@@@@@@@@@@@
//1) Copy this trigger.
//2) Copy the Ability "Scatter Shot" from the Object Editor.
//3) Copy the Ability "Kaboom - Energy Ball" from the Object Editor.
//4) Copy the Dummy unit "EnergyBall" from the Object Editor.
//5) Copy the sound from the sound editor
//6) Make sure to see if the variable name of the sound have changed and just simply change it's name to the name used here - ShootSound.
//7) Export the texture Green_Glow2 from the Import Manager to your computer and import it to the requested map.
//8) after you have imported the texture just change the path of the texture to "Textures\Green_Glow2.blp" and that's it.
//9) Make sure to check if the Raw Id of the ability "Scatter Shot" and the unit "EnergyBall" are the same as the constants.
//10) If you don't know how to check the Raw Id simply go to the object editor and press CTRL+D and you will see it right away.
//11) Check the constant functions if you wanna change things in the skills like Damage,Raw Id and etc'.
//12) ~Have Fun~ <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" />
//@@@@@@@@@@@@@@@@@@@@@@@@@@@ Constants Start Here @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//Make sure the raw id of the ability "Scatter Shot" is the same as the one below if not change it.
constant function SS_AbilityId takes nothing returns integer
return 039;A000039;
endfunction
//Make sure the raw id of the dummy unit "EnergyBall" is the same as the one below if not change it.
constant function SS_DummyId takes nothing returns integer
return 039;n000039;
endfunction
//This Constant changes the damage per ball which is by default 40.00.
constant function SS_DamagePerBall takes nothing returns real
return 40.00
endfunction
//This Constant changes the number of balls per level which is by default 25 multiplied by the level of the skill.
constant function SS_BallPerLevel takes integer level returns integer
return 25*level
endfunction
//This is the sound variable name in case you wanna pick another name for it just do - gg_snd_<Your variable name> make sure your variable has the same name as well.
//
constant function SS_SoundVariable takes nothing returns sound
return gg_snd_ShootSound
endfunction
//@@@@@@@@@@@@@@@@@@@@@@@@@@@ Constants End Here @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//From this point on unless you know JASS i suggest not to touch anything.
function SS_Condition takes nothing returns boolean
return (GetSpellAbilityId()== SS_AbilityId())
endfunction
function SS_Actions takes nothing returns nothing
local unit hero = GetTriggerUnit()
local real heroX = GetUnitX(hero)
local real heroY = GetUnitY(hero)
local unit target = GetSpellTargetUnit()
local real targetX = GetUnitX(target)
local real targetY = GetUnitY(target)
local real randomX
local real randomY
local real randomZ
local real ballX
local real ballY
local real dx
local real dy
local real distance
local real rate
local unit array ball
local real ms = GetUnitMoveSpeed(target)
local real height = GetUnitFlyHeight(target)
local sound shot = SS_SoundVariable()
local integer level = GetUnitAbilityLevel(hero,SS_AbilityId())
local integer i = 1
call SetUnitAnimation(hero,"stand")
call SetUnitMoveSpeed(target,0)
call SetUnitInvulnerable(hero,true)
call TriggerSleepAction(0.5)
call SetUnitTimeScale(hero,5)
call PauseUnit(hero,true)
loop
exitwhen(i>SS_BallPerLevel(level))
call StopSound(shot,false,false)
call SetUnitAnimation(hero,"attack 3")
call StartSound(shot)
set ball<i> = CreateUnit(GetOwningPlayer(hero),SS_DummyId(),heroX,heroY,GetUnitFacing(hero))
set randomX = GetRandomReal(targetX-450,targetX+450)
loop
exitwhen(randomX >= targetX+150 or randomX <= targetX-150)
set randomX = GetRandomReal(targetX-450,targetX+450)
endloop
set randomY = GetRandomReal(targetY-450,targetY+450)
loop
exitwhen(randomY >= targetY+150 or randomY <= targetY-150)
set randomY = GetRandomReal(targetY-450,targetY+450)
endloop
call IssuePointOrder(ball<i>,"move",randomX,randomY)
set ballX = GetUnitX(ball<i>)
set ballY = GetUnitY(ball<i>)
set dx = randomX-ballX
set dy = randomY-ballY
set distance = SquareRoot(dx*dx+dy*dy)
set randomZ = GetRandomReal(50,500)
set rate = randomZ/(distance/522)
call SetUnitFlyHeight(ball<i>,randomZ,rate)
call TriggerSleepAction(-1)
set i = i+1
endloop
call TriggerSleepAction(2.5)
call SetUnitTimeScale(hero,1)
call SetUnitAnimation(hero,"spell")
set i = 1
loop
exitwhen (i>SS_BallPerLevel(level))
if(GetUnitState(target,UNIT_STATE_LIFE) <= 0.405) then
set i = SS_BallPerLevel(level)+1
else
set ballX = GetUnitX(ball<i>)
set ballY = GetUnitY(ball<i>)
set dx = targetX-ballX
set dy = targetY-ballY
set distance = SquareRoot(dx*dx+dy*dy)
set randomZ = GetUnitFlyHeight(ball<i>)+50
set rate = randomZ/(distance/522)
call SetUnitFlyHeight(ball<i>,height+50,rate)
call IssueTargetOrder(ball<i>,"selfdestruct",target)
call TriggerSleepAction(-1)
call UnitDamageTarget(hero,target,SS_DamagePerBall(),true,false,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_UNKNOWN,WEAPON_TYPE_WHOKNOWS)
set i = i+1
endif
endloop
set i=1
call TriggerSleepAction(0)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl",targetX,targetY))
call TriggerSleepAction(0.5)
loop
exitwhen (i>SS_BallPerLevel(level))
call KillUnit(ball<i>)
set ball<i> = null
set i = i+1
endloop
call TriggerSleepAction(0.5)
call PauseUnit(hero,false)
call SetUnitMoveSpeed(target,ms)
call SetUnitInvulnerable(hero,false)
set hero = null
set target = null
set shot = null
endfunction
//===========================================================================
function InitTrig_Scatter_Shot takes nothing returns nothing
set gg_trg_Scatter_Shot = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ(gg_trg_Scatter_Shot,EVENT_PLAYER_UNIT_SPELL_CHANNEL)
call TriggerAddCondition(gg_trg_Scatter_Shot,Condition(function SS_Condition))
call TriggerAddAction( gg_trg_Scatter_Shot,function SS_Actions)
endfunction
</i></i></i></i></i></i></i></i></i></i></i></i>
i hope it's approved
the map is attached below have.
~Have Fun~