| Sponsored Links - Login to hide this ad! |
|
|
|
|
#32 | |
|
extends net.wc3c.Jasser
|
Quote:
I was also concerned, but I didn't have enough motive to change. Thanks. |
|
|
|
|
|
|
#33 |
|
obey
|
this is madness...
JASS:library InvulnerabilityDetector //THIS IS SPARTAAAAAAAAA function IsUnitInvulnerable takes unit whichUnit returns boolean local boolean result = false // default false local real HPSTATE = GetWidgetLife(whichUnit) call UnitDamageTarget(whichUnit,whichUnit,0.01,false,true,null,null,null) if GetWidgetLife(whichUnit) == HPSTATE then return true else return false endif return false endfunction endlibrary looks like "null ownage" still works. ever if banish ruin all fun, there is check for ethereal state, on this check we can use other attacktype. well, there is banish+spell immune no problem proof. result by modded function ofc. Last edited by DioD : 01-03-2009 at 05:14 PM. |
|
|
|
|
|
#34 |
|
User
Join Date: Oct 2006
Posts: 1,490
|
And in this unlucky case :
__________________The unit has just a little more than 0.405 hp and she is vulnerable, she will die for no reason. And there is a constant witch allow to hit invulnerable units, no ? Hmm finally i will make my own function which checking if the unit has one of the invulnerable buff. Credit to Rising_Dusk :p Last edited by Troll-Brain : 01-03-2009 at 05:24 PM. |
|
|
|
|
|
#35 | |
|
extends net.wc3c.Jasser
|
Quote:
Your method indeed functions, but there is a flaw. No matter which parameter you change or not, UnitDamageTarget will trigger EVENT_UNIT_DAMAGED every time called with vulnerable units: which is undesirable. Please consider why I did all sort of extra stuff; a function that works with anything and anytime. |
|
|
|
|
|
|
#36 |
|
Rehabbing
|
if someone has a DDS, they can easily omit any damage they want - such as in this case
__________________ |
|
|
|
|
|
#38 |
|
obey
|
You can use damage dummy, if not able to set up filters yourself.
There is no problem with events. JASS:function IsUnitInvulnerable takes unit whichUnit returns boolean local boolean result = false // default false local real HPSTATE = GetWidgetLife(whichUnit) call SetWidgetLife(whichUnit,HPSTATE + 0.01) call UnitDamageTarget(whichUnit,whichUnit,0.01,false,true,null,null,null) if GetWidgetLife(whichUnit) == HPSTATE then return true else return false endif return false endfunction There is no more problem with 0.405 hp, since unit will get hp before taking damage. |
|
|
|
|
|
#39 | |
|
extends net.wc3c.Jasser
|
Quote:
That would impose limitation that one should use DDS or configure it additionally. This makes extra (indirect) dependency. Suppose you are making an AoS and decide to implement a takeover feature. In this case, you don't necessarily have to use DDS; detecting damages on a few major buildings would work fine without DDS. However, if I need to force doing such configuration, it is overcomplicating things on the user's side. I think unnecessary dependencies should be avoided in the modules (whether it is Jass, C, C#, or whatever), and I wrote them to be independent as possible. It is user's choice anyway, to choose simpler implementation but more work on the user's side, or a bit complex implementation but simple and handy on the user's side. (I think performance difference in this particular case is trivial, though) Last edited by ToukoAozaki : 01-04-2009 at 02:42 AM. |
|
|
|
|
|
|
#40 |
|
Obscurity, the Art
|
Any AoS without a DDS is going to be limited in the scope of its design anyways, so as far as we're concerned your example falters. Anyways, this is not a discussion of game design, so please don't use silly, mis-representative examples.
__________________Anyways, you have still failed to address why using the boolean return of a UnitDamageTarget() call won't work. Technically, your current library will set off false positives for systems that intercept unit orders, so it imposes just as much a user-side dilemma as the UnitDamageTarget() boolean return. As far as I am concerned, with regards to actual maps, the overhead to ignore 0.00 damage events is obvious, whereas ignoring random orders in order-related systems may not be. Regardless, I stand by what we decided on earlier. If you can prove via testmap that a custom FoD ability is the only way to do this library effectively, then I'll buy into it. |
|
|
|
|
|
#41 |
|
obey
|
UnitDamageTarget()
return true, always, no matter what params, tested on paladin. DDS system - if you can not add filters - dont use jass its overcomplicated for you. |
|
|
|
|
|
#42 | |
|
Obscurity, the Art
|
Quote:
|
|
|
|
|
|
|
#43 | ||||
|
extends net.wc3c.Jasser
|
Quote:
Quote:
Please read what I wrote. Quote:
Quote:
Would a proof that there is no event fired be enough, then? Last edited by ToukoAozaki : 01-04-2009 at 05:50 AM. |
||||
|
|
|
|
|
#44 |
|
obey
|
Rising_Dusk
Read my posts, just a time, more - better. I posted proof screen. There is proof map. |
|
|
|
|
|
#45 |
|
extends net.wc3c.Jasser
|
I have updated the testmap. You can now see every issued order on the screen. :)
You can test it yourself, or see attached screenshot. If checking invulnerability against vulnerable units causes an order to fire, it should be displayed on the screen. You can also compare the result by commenting out PauseUnit calls (doing so will cause the event to fire.). Last edited by ToukoAozaki : 01-04-2009 at 11:05 AM. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
|
Donate |