Viikuna
No Marlo no game.
- Reaction score
- 265
Sry, I wasnt actually complaining. I just tought there might have been something I dont know, like some reason not to use that BJ.
Thx for fast answer.
Thx for fast answer.
Oh. Sorry for accusing you thenSry, I wasnt actually complaining. I just tought there might have been something I dont know, like some reason not to use that BJ.
Thx for fast answer.
...By Using orb effects or other massive systems which require you to change nearly everything in your map.I think there is a way to check if the damage was done by a spell.
Exactly.Ye, that is the reason why it is tricky to make some damage/attack detection system, which would work in all maps.
For your own map, it is easy to just do all spell damage trought some dummy units, so only damage your unit deals, is hes / shes normal attack.
EDIT. ofc that means you need to trigger all damage sources. Abilities like cleave would ruin it, I guess.
Exactly.
It is possible. Making all ability damage triggered is an easy option. But not for a tutorial. I'm not exactly going to write
"For this spell to work, you need to get rid of all your non-triggered spells and trigger them. And also use a 10,000 line system."
Wow.. Someone understands meA basic damage detection system is about 20 lines all up, and only requires you to code orb effects, which is the point of a damage detection system anyway, to code passive attacks.
I see where you are coming from though, it could make the tutorial a lot more confusing for someone.
Well.. Maybe.I mostly though since this is a "Creating a Passive Ability in Jass"-thread it should involve something else than a "Unit is Attacked" event feature (which frankly isn't used a lot anyway). The tutorial itself is well explained and should teach one or another something about coding in JASS.
Ye, from the looks of it, it'd only work vs. heroes (and, AFAIK, IsUnitType must be compared against true/false, and not left on it's own, to prevent bugs)One question: if IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) returns true then the unit is a hero, so wouldn't the trigger only work against heroes instead of never against heroes?
.97% probably won't make much of a difference anyway =DAlso, if it procs on 2 or lower on a 0-100 roll, that's 2.97% chance and not 2%.
GetRandomInt(0, 100) <= CHANCE(GetUnitAbilityLevel(GetTriggerUnit, 039;Pwnt039;))
I'm reading this tutorial and it's really great, I like how you don't just paste all the code at once but instead leave it up to the reader to figure out what should be done before you show how you did it.
One question: if IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) returns true then the unit is a hero, so wouldn't the trigger only work against heroes instead of never against heroes?
Also, if it procs on 2 or lower on a 0-100 roll, that's 2.97% chance and not 2%.
Just my thoughts so far, I'll go back to reading it now.
Ye, from the looks of it, it'd only work vs. heroes (and, AFAIK, IsUnitType must be compared against true/false, and not left on it's own, to prevent bugs)
.97% probably won't make much of a difference anyway =D
That uses the attacker (and it's got a syntax error too, since there's no () after GetTriggerUnit )
Alright I think I understand now. Just need to change the conditions a bit.
Will this work if I put the ability on neutral hostiles as well or do I have to make a seperate trigger/ability for them? Seems the unit has to belong to a player for it to register the event.
but looking at other spells (well, that's how I did it, not sure about everyone else) caters for configuration, and (m)any (v)JASS tutorial would cover the restAs well as this, you'll learn how to make spells easily configurable, use scopes, and other Jass skills.
Hmmm... the useful-ness of this tutorial kinda eludes me, mainly due to it's specific nature. Pretty much anyone would have a basic understanding of how to trigger an On Attack passive (i.e. the event primarily, which is the main thing), and if someone wanted to make something like additional damage based on an attribute (or something, who knows), this tutorial is of little use, other than
People probably have/will find this useful, but I can't see how alot of this would either go without saying, or has already been covered by others, on numerous occasions