Spell Scatter Shot

Carl-Fredrik

New Member
Reaction score
51
Pros:
Really cool spell
Usable in many games
Nice special effects

Cons:
Too long casting time
Damage is done before the explosion
Imballanced
 

Flare

Stops copies me!
Reaction score
662
Pros:
Really cool spell
Usable in many games
Nice special effects

Cons:
Too long casting time
Damage is done before the explosion
Imballanced

That's for the end-user to determine, since damage is changeable via the SS_DamagePerBall and, to an extent, SS_BallPerLevel, and casting time is changeable in Object Editor
 
W

War-Crafter

Guest
This is the trigger im using from your map but it isnt working. i have everything i was suppose to copy from your map but i think theres a problem with the trigger. Can you tell me what is wrong with it.

//@@@@@@@@@@@@@@@@@@@@@@@@ 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~ :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 'A000'
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 'n000'
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 = 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,"move",randomX,randomY)
set ballX = GetUnitX(ball)
set ballY = GetUnitY(ball)
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,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)
set ballY = GetUnitY(ball)
set dx = targetX-ballX
set dy = targetY-ballY
set distance = SquareRoot(dx*dx+dy*dy)
set randomZ = GetUnitFlyHeight(ball)+50
set rate = randomZ/(distance/522)
call SetUnitFlyHeight(ball,height+50,rate)
call IssueTargetOrder(ball,"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)
set ball = 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
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
sorry i wasn't here
could post me the errors u get?
and did u make sure to follow instructions?
 

guitar89

New Member
Reaction score
0
I kinda have some problem too, i copied the trigger, 'scatter shot', 'kaboom',
'energy ball' and sound. I correct the skill for energy ball from burrow(my custom skill) to kaboom, and the raw ID of 'energy ball', sound and 'scatter shot' into constant. But my skill got some buggy, my hero keep casting many times if the target didn't dies, no manacost and cooldown. I reimport follow those above and check manacost & cooldown on 'scatter shot'. Could you tell me my problem ? thank.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
pheraphs i paused it too quickly but i guess it shouldn't have been a problem if you haven't touched anything in the scatter shot ability (the channel based) make sure you haven't changed anything regarding time.

just to make sure i understood - the skill loops until no mana or targets right?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top