Spell Multi-Slash

elmstfreddie

The Finglonger
Reaction score
203
But when I put in a unit it says Cannot convert units to widgets in JASSCraft.

Widgets aren't units btw. Search widget in JASSCraft, and a comment says a good description.
 

Seannny

Why GUI when you can Jass?
Reaction score
46
Great job Elm.
im glad your now into JASS...*sighs*
i remember when he called his first function! *Cries* They grow up so fast!
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
But when I put in a unit it says Cannot convert units to widgets in JASSCraft.

Widgets aren't units btw. Search widget in JASSCraft, and a comment says a good description.

Actually units are widgets. Believe me, because units are an interactive living game object, though it doesn't seem so.
Anyways, when I do this, it works perfectly fine:
JASS:
function poo takes nothing returns nothing
    call GetWidgetLife(GetTriggerUnit())
    call GetWidgetX(GetTriggerUnit())
    call GetWidgetY(GetTriggerUnit())
    call SetWidgetLife(GetTriggerUnit(),500)
endfunction


What function or call are you using because triggering unit does not syntax with this. ;)
 

elmstfreddie

The Finglonger
Reaction score
203
Eh???
Didn't give me the error this time.
I seriously got the error: Cannot convert unit to widget.
Oh well, my JASSCraft is screwed up or something, it often gives the same error 50 times over when it only occurs once, and will tell the wrong line, and other gay stuff like that.
Ok, removing damage BJs now.
 

elmstfreddie

The Finglonger
Reaction score
203
Ok, things fixed:
1 bj left in my trigger which I won't fix any how (any unit event, no biggie)
All baddies nulled
Mirror image effect added
Faster time between attacks (but time between attacks still decreases)
Better variable names
More efficient stuff thrown in
Shortened my trigger got rid of some useless triggering
Better % chance to hit than before, because of that tooltips are better

Thanks for suggestions everyone.
but after a while I kept getting DEADLY BLOW!! and killing the enemies instantly
I don't think that was an error, I made it so if your strike kills them it shows DEADLY BLOW!! instead of the damage dealt. It looks cooler. It's the same message as getting to the 15th strike, but the 15th strike kills no matter what. If your normal strike just so happens to kill, it says deadly blow.
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
Not bad, not bad at all :)
How long did you work on this?
How long time ago did you "convert" from GUI > JASS...
Have you read much TUTs? Which one? (kattanas:O?)
I want to know, because, I might convert too :) And if it does not requires too much time, ye, I'll do it.;)
Cheerio
 

elmstfreddie

The Finglonger
Reaction score
203
I converted like a week ago, and I didn't read any tuts. I'm in IKilledKenny's JASS class, which got me kick started. Mostly I've been learning JASS on my own between classes, somewhat becoming self taught like I was with JASS.
Join IKilledKenny's JASS 101 Class. Now.

It took... Well, some quite time since it's just about my first real JASS trigger. Most of my time was used balancing nerfing etc the spell.
 

Sim

Forum Administrator
Staff member
Reaction score
534
Cool spell.

A bit flawed though.

First of all, you have no constant functions included in the trigger, which makes it mostly not editable. At the very limit include a constant raw code for your ability and dummy Ids just so one doesn't need to fill in the trigger with his own raw codes.

Second, the fact that the spell kills is very nice and all, but it prevents good levelability, as anyone wanting extra levels on the spell will rig the "Deadly Blow" engine. I suggest you remove it and keep it on kill only, as well as add constant functions involving levelability, such as damage * level, number of strikes * level, etc.

Third, it is nice, but hard to use in a well-balanced map. It lasts a random time, it stuns for this random duration, and its damage increases almost exponentially (which, multiplied with the random factor makes it even more unreliable as you can do 10 damage as well as 1000 :p).

Keep it up!
 

elmstfreddie

The Finglonger
Reaction score
203
As I said, I'm new to JASS. I don't know how to use constant functions, but I'm sure Kenny's classroom will get around to them eventually. Once I learn about them, I will edit the code and make this, better.

I realized about the exponential damage thing, but you can always edit the damage done (apparently not well since I didn't use constants ;))

And if they wanted to rig the deadly blow engine, that's their own fault lol. It always says deadly blow if the normal damage kills the unit, or if you get to the 15th strike it will kill no matter what and say DEADLY BLOW!
I actually triggered it so if the unit dies to say deadly blow, however I could disable that because it seems to be confusing people =/

I could possibly turn off the stun of the target unit, but unpausing the caster would cause problems (they could run and cast spells in between moves)
 

Sim

Forum Administrator
Staff member
Reaction score
534
The caster paused is ok.

> And if they wanted to rig the deadly blow engine

I'm sorry I didn't explain my point well enough in the above post :eek:

What I mean is, the 3rd level kills instantly the unit if it reaches 15 blows. Definitely shatters levelability. Remove this. Make it shout "Deadly Blow!" only if the unit actually dies from the ability, not as soon as 15 blows are done.

Constant functions are easy to use. You just add things like that throughout the trigger.

JASS:

constant function MultiSlash_Damage_FirstStrike takes integer level returns nothing
    10 + 0 * level
endfunction

constant function MultiSlash_DamageIncrement_EveryStrike takes integer level returns nothing
    10 + 0 * level // Damage increase every succeeding hit. In your case it increases by 10. (10, 20, 30, 40, 50, 60, etc.)
endfunction

constant function MultiSlash_NumberOfStrikes takes integer level returns nothing
    5 + 0 * level
endfunction

constant function MultiSlash_Whatever takes integer level returns nothing
    1 + 0 * level 
// Basically how this formula works is that you add a constant value, such as 1, and add another value based on the level. 
// I input 0 * level in the above functions but it can be anything, such as 4 * level, 2 + (1 / (level *3) ), etc.
endfunction
 

elmstfreddie

The Finglonger
Reaction score
203
Does WE/JASS follow order of operation? Because if it does those examples you gave would end up as the numbers you gave, because 10 + 0 * level would just be 10 >.<

Anyhow, I'll try to do that. How do I refer to constants? Just say call function with the arguments like any other one? Or do I just write in function(arguments) in middle of, whatever?

Edit > K for the new update I might make it always go to 10 strikes, or maybe a small increase like 10, 11, 12. Then every level increases chance to hit, and damage slightly. Maybe 5 for level 1, 6 for level 2, and 7 for level 3. I figured I had to decrease it anyhow because of the unbalancedness =/
 

Sim

Forum Administrator
Staff member
Reaction score
534
> Because if it does those examples you gave would end up as the numbers you gave, because 10 + 0 * level would just be 10 >.<

When posting a spell you need to set it so it adds zero whatever the level is. Up to the user to change it though, such as replacing the "0" with a "1".

> How do I refer to constants? Just say call function with the arguments like any other one? Or do I just write in function(arguments) in middle of, whatever?

call FUNCTION_NAME(arguments), just as normal functions.
 

elmstfreddie

The Finglonger
Reaction score
203
Yes but say I use damage in the UnitDamageTarget, you can't call functions in middle of calling a function =/
 

Sim

Forum Administrator
Staff member
Reaction score
534
What do you mena? For sure.

call UnitDamageTarget(MultiSlash_Damage_FirstStrike(level), other arguments...)

In fact, you can define a local to the damage, and then use it.
 

Tom Jones

N/A
Reaction score
437
This is not getting approved before you add some constant functions to modify the spell.
And are you sure it kills units with the 15'th blow?
This shouldn't work:
JASS:
                if((GetUnitState(Target,UNIT_STATE_LIFE))== 0) then 
                    set blood[l] = AddSpecialEffect(&quot;Objects\\Spawnmodels\\Orc\\OrcLargeDeathExplode\\OrcLargeDeathExplode.mdl&quot;,GetUnitX(Target),GetUnitY(Target))
                    set t[l] = CreateTextTag()
                    call TextTagMessage(t[l],1.50,255,20,20,255,(1.00-(0.05*l)),GetUnitX(Caster),GetUnitY(Caster),0.00,0.00,0.030,&quot;DEADLY BLOW!&quot;,0.03,true)               
                    call PauseUnit(Caster,false)
                    call PauseUnit(Target,false)
                    set t[l] = null
                    set Caster = null
                    set Target = null
                    set blood[l] = null
                    set mirroreffect[l] = null
                    return
Try checking if the targets life is below 1 instead.
 

elmstfreddie

The Finglonger
Reaction score
203
Yo Tom, way to bump this lol.
I was (still am) in the process of working on many other things, so I was holding off making this (decent) for a bit.
Heh -.-

Hmm, could you like close this for a bit until I PM you to tell you to open it again?
I haven't gotten around to fixing the triggering yet, so atm it isn't very good o_O
 
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