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.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • 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

      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