Spell Summon Darkness

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
Summon Darkness

Through some unknown property of matter Enemy units within 500 will take the distance in damage. The nearer the Units are the more they will get slowed.
Level 1 - 2 Seconds Slow
Level 2 - 4 Seconds Slow
Level 3 - 6 Seconds Slow

GUI\JASS: JASS (MY FIRST JASS SPELL :D)
Difficulty to import:Easy
MUI\MPI:Both and more (instant cast)


I know its not the best spell ever submitted here but its my first jass spell so pls dont flame me like "i can do this in 1 second"

wc3scrnshot080508131410nu2.jpg


JASS:

function Trig_Cast_Actions takes nothing returns nothing
local group ug
local unit u
local unit caster
local unit dum
local location p
local location up
local real r
local player play

set caster = GetTriggerUnit()
set p = GetUnitLoc(caster)
set ug = GetUnitsInRangeOfLocAll(500.00, p)
set play = GetOwningPlayer(caster)
call CreateUnitAtLoc(play , 'e001', p, 0.00)
loop
   set u = FirstOfGroup(ug)
   exitwhen u==null
   call GroupRemoveUnit(ug,u)
   if  IsUnitEnemy(u, play)==true then
   set up = GetUnitLoc(u)
   set dum = CreateUnitAtLoc(play, 'e000' , p, 0.00)
   set r = DistanceBetweenPoints(p , up)
   call SetUnitAbilityLevel( dum, 'A001', ( ( R2I(r) / 50 ) + ( ( GetUnitAbilityLevel(caster, 'A000') - 1 ) * 10 ) ) )
   call IssueTargetOrder(dum, "slow" , u)
   call UnitApplyTimedLife (dum, 'BTLF', 0.30)
   call UnitDamageTargetBJ( caster, u, r, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
   set dum = null
   call RemoveLocation(up)
   endif
endloop
call DestroyGroup(ug)
set u = null
set caster = null
set play = null
call RemoveLocation(p)

endfunction

function Trig_Cast_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A000'
endfunction


//===========================================================================
function InitTrig_Cast takes nothing returns nothing
    set gg_trg_Cast = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Cast, Condition( function Trig_Cast_Conditions ) )
    call TriggerAddAction( gg_trg_Cast, function Trig_Cast_Actions )
endfunction
 

Attachments

  • Summon Darkness.w3x
    20.5 KB · Views: 193

Trollvottel

never aging title
Reaction score
262
coding is okay. but you forgot to null p. spell idea is nice too and there is not too much eyecandy. so overall, nice spell
 

GoGo-Boy

You can change this now in User CP
Reaction score
40
You must null the location variables, even though you removed the locations.
And if possible initialize the variables at the beginning if you can.

JASS:
local group ug
local unit u
local unit caster
local unit dum
local location p
local location up
local real r
local player play

set caster = GetTriggerUnit()
set p = GetUnitLoc(caster)
set ug = GetUnitsInRangeOfLocAll(500.00, p)
set play = GetOwningPlayer(caster)
call CreateUnitAtLoc(play , 'e001', p, 0.00)


JASS:
local unit u
local unit caster = GetTriggerUnit()
local unit dum 
local location p = GetUnitLoc(caster)
local location up
local real r
local player play = GetOwningPlayer(caster)
local group ug = GetUnitsInRangeOfLocAll(500.00, p)

call CreateUnitAtLoc(play , 'e001', p, 0.00) // what are you doing with this unit? You don't add it to a variable and have no control about it... so how do you want to remove it etc.


Edit: I do not understand how units that are nearer get a stronger slow.
 

GoGo-Boy

You can change this now in User CP
Reaction score
40
My god MRC-ELSKER. How about keep manner? It is his first JASS spell and you respond in a somewhat aggressive way?
I remember your first stuff that looked by far more horrible than this... so give constructive feedback.
 

Flare

Stops copies me!
Reaction score
662
Nice looking spell (what model was used? enlarged Holy Light?) even though darkness and bright yellow light don't seem like things that go together IMO :p, and good idea for a spell :thup:

Learn to indent (intend, dunno how it's spelled) ffs.
GoGo-Boy has already said this, but hell, there's no need for that - if you really want to point out that the indentation isn't great (atm it's not horrible, but could be slightly better) you don't need to make it sound terrible. And you aren't really in any position to complain about indentation because the first spells you made had some pretty horrible indentation as well
 

GoGo-Boy

You can change this now in User CP
Reaction score
40
To the effect I got to add that it is too big. I wonder why people always add too big effects. Make em look good but not too huge.

I like the Idea behind this spell although I doubt that it is working exactly the way you want it to be atm.
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
yes it will work like i wanted :)
check the ability slow (it goes down from 70%)
do i have to nullify and remove the locations?

EDIT:
call CreateUnitAtLoc(play , 'e001', p, 0.00)
this unit has an negative hp regen --> will die in 1.5 second
 

GoGo-Boy

You can change this now in User CP
Reaction score
40
Lols, well that might be another way^^.

But seriously, you shouldn't forget that that increases implantation difficulty since everyone had to make an extra dummy for that.

just do something like this so a normal dummy is enough (if you use the model that was made for caster system you can add the models with AddSpecialEffect... the effects increase as well if model size increases)

JASS:
local unit effect_unit = CreateUnit(blbllblabla)
call SetUnitScale(effect_unit,3,3,3) // since I guess it is your big effect ; )
call ApplyTimesLife(asfasfa) // or how the function is called


And yes you must remove and null locations (and groups)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top