Spell Blade Fury

WolfieeifloW

WEHZ Helper
Reaction score
372
Basically it's like this;
Instead of a constant damage/damage per level, ex:
JASS:
private constant real DAMAGE = 200.

You put it in a function so that people can make their own formulae to calculate the damage they want, ex:
JASS:
private function DAMAGE takes integer level returns real
    return (level * 50) + 20
endfunction

So, if you input level 2, it'd be ((2 * 50) + 20) which is 120.
If level 3, ((3 * 50) + 20) which is 170.

To call it simply do:
JASS:
DAMAGE(GetUnitAbilityLevel(unit whichUnit, integer abilcode))
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Nope.
It'd be:
JASS:
return (level * 50) + 20

The GetUnit... goes wherever you call it.

EDIT: Actually, to return a real the "50" needs to be "50.".
Notice the dot.
 

BRUTAL

I'm working
Reaction score
118
i dont understand, how you can leave 'level' in that equation : s :confused:

but yesyse, i understand the real and the dot thing
 

WolfieeifloW

WEHZ Helper
Reaction score
372
The function "takes" level.
So when you call upon the function in your triggers, ex:
JASS:
UnitDamageTarget(...DAMAGE(GetUnitAbilityLevel(GetTriggerUnit(), 'A000'))...)

It passes the level of said ability for said unit to the DAMAGE function.
The function then takes the abilities level and filters it into the equation;
JASS:
return (<LEVELOF'A000'FORTRIGGERUNIT> * 50) + 20
 

BRUTAL

I'm working
Reaction score
118
alright, alright i got it now, except how would it get this damage into the floating texts ><
 

BlackRose

Forum User
Reaction score
239
JASS:
private function actions takes nothing returns nothing
    local unit u = GetTriggerUnit()
    local unit t = GetSpellTargetUnit()
    local unit d 
    local player p = GetOwningPlayer(u)
    local real x = GetUnitX(u)
    local real y = GetUnitY(u)
    local real facing = GetUnitFacing(u)
    local integer i = 0
    local Data data = Data.create() 
    set SOUND[0] = gg_snd_BarakBFSlice1
    set SOUND[1] = gg_snd_BarakBFSlice2
    set SOUND[2] = gg_snd_BarakBFSlice3
    set data.caster = u
    set data.x = x
    set data.y = y
    call SetUnitTimeScale (u, 3)
    set d = CreateUnit (p, DUMMY_ID2, x, y, 0)
    call UnitAddAbility (d, ID2)
    call IssueTargetOrder (d, &quot;thunderbolt&quot;, u)
    call UnitApplyTimedLife (d, &#039;BTFL&#039;, 1)
    set d = null
    set data.target = t
    loop
    exitwhen i == 2
        set bj_lastCreatedUnit = CreateUnit (p, DUMMY_ID, x, y, facing)
        call SetUnitTimeScale (bj_lastCreatedUnit, 1.5)
        call SetUnitVertexColor (bj_lastCreatedUnit, 255, 255, 255, TRANS)
        call GroupAddUnit (data.dummy, bj_lastCreatedUnit)
        set i = i + 1
    endloop
    call TT_Start(function PeriodicFunc, data)
    set u = null
    set t = null
    set d = null
endfunction

??? Why have a local and then set struct to the local.
set data.caster = GetTriggerUnit()
set data.x = GetUnitX( d.caster )
set data.y = GetUnitY( d.caster )

JASS:
set SOUND[0] = gg_snd_BarakBFSlice1
    set SOUND[1] = gg_snd_BarakBFSlice2
    set SOUND[2] = gg_snd_BarakBFSlice3

I think there is: (or are those sounds MUI? Sounds for me never work when I use Sound Editor!)
JASS:
native CreateSoundFromLabel takes string soundLabel, boolean looping, boolean is3D, boolean stopwhenoutofrange, integer fadeInRate, integer fadeOutRate returns sound
 

BRUTAL

I'm working
Reaction score
118
i do it because of personal preference, i find it easier that way.

what do you mean about the sounds, sound cant be mui? o_O
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
Sounds are MUI if you CREATE them each time the ability is cast. But if you only PLAY a sound then it can only be used once at a time.
 

BRUTAL

I'm working
Reaction score
118
hm i see, yes i noticed that it wasnt really working well my way
so i should 'create' them like how it was posted earlier?
 

BlackRose

Forum User
Reaction score
239
But there is no point in creating the locals and then setting the globals to locals when you can just set the struct to it first.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Some things that seemed..."Weird" to me :p :
  • Its unit target, yet it slashes other opponents if the target dies.
  • Once you start, you can't stop.
  • If you cast and a unit walks out of range, you sit there slashing air.
 

BRUTAL

I'm working
Reaction score
118
well have you ever played a mortal kombat game on any game platforms?
because i recreated how it is in mortal kombat for my map :p

well what do you suggest? that when/if the target dies from the spell, to stop it from continuing?

well yes your not supposed to be able to stop doing an ability while it is going in mortal kombat, plus the spell only takes around 3.2 seconds to finish, not very long

yes well thats a risk you have to take, maybe the enemy player will be a retard and not move, i wouldnt be surprised.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
  1. Hmm, I guess that could be left as it is useful.
  2. 3.2 seconds is a long time; Difference between life and death IMO.
  3. If you added in the ability to move during the spell this would be easy to fix too.
 

BRUTAL

I'm working
Reaction score
118
well i suppose making the hero able to move would solve 2 and 3 but i dont know, i could do it, but it wouldn't be like the mortal kombat ability then;
maybe i can add a boolean so people can decide if they want the hero to be able to move or not
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Yeah;
A boolean would be best ;) .

Being able to move would make this move feasible in many maps instead of just "Mortal Kombat" maps :p .
 
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