wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > Triggers & Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 07-12-2009, 07:42 AM   #1
Deaod
User
 
Join Date: Jan 2007
Posts: 542

Submissions (11)

Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)

Default UnitHasBuffsEx

Collapse JASS:
native UnitHasBuffsEx takes unit whichUnit, boolean removePositive, boolean removeNegative, boolean magic, boolean physical, boolean timedLife, boolean aura, boolean autoDispel returns boolean

Alright, does anyone know if this native does what i suppose it does (returning true if the specified unit has a buff matching certain criteria)?

My tests so far have shown nothing (it always returns false).
__________________

Last edited by Deaod : 07-12-2009 at 07:42 AM.
Deaod is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 07-12-2009, 09:33 AM   #2
DioD
obey
 
DioD's Avatar
 
Join Date: Feb 2006
Posts: 1,532

Submissions (4)

DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)

Send a message via ICQ to DioD
Default

this is gui function as i know, read comment...

and better tell us what you want to do, not how you want to do it.

Last edited by DioD : 07-12-2009 at 09:34 AM.
DioD is offline   Reply With Quote
Old 07-12-2009, 10:09 AM   #3
Deaod
User
 
Join Date: Jan 2007
Posts: 542

Submissions (11)

Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)

Default

UnitHasBuffsEx is not integrated into GUI as far as i can see.
However, UnitCountBuffsEx is. If theres any consistency in Blizzards natives, UnitHasBuffsEx doesnt work (using the same parameters on it as if i was counting buffs using UnitCountBuffsEx).

What i want to do:
Detect if a unit is under the effect of ANY debuff (excluding expiration timers).
__________________
Deaod is offline   Reply With Quote
Old 07-12-2009, 11:09 AM   #4
DioD
obey
 
DioD's Avatar
 
Join Date: Feb 2006
Posts: 1,532

Submissions (4)

DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)

Send a message via ICQ to DioD
Default

you can count debufs, play with UnitCountBuffsEx non zero return mean there is debuff (for units with summoned classification deduct 1 from result, there is only one exp timer per unit possible)
DioD is offline   Reply With Quote
Old 07-12-2009, 02:25 PM   #5
Deaod
User
 
Join Date: Jan 2007
Posts: 542

Submissions (11)

Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)

Default

bad news, UnitCountBuffsEx doesnt work as well. Can anyone confirm this, or is it just me being dumb?
__________________

Last edited by Deaod : 07-12-2009 at 02:28 PM.
Deaod is offline   Reply With Quote
Old 07-12-2009, 02:55 PM   #6
DioD
obey
 
DioD's Avatar
 
Join Date: Feb 2006
Posts: 1,532

Submissions (4)

DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)

Send a message via ICQ to DioD
Default

there is advent of zenith map, it is not open source but, anyway check its code, since it contain some spells with damage per buff effects.
DioD is offline   Reply With Quote
Old 07-12-2009, 03:29 PM   #7
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

I manually control all buffs in the map, so I can detect if units suffer them at will through the system. I do not use any native or something special.
__________________
Rising_Dusk is offline   Reply With Quote
Old 07-12-2009, 04:57 PM   #8
DioD
obey
 
DioD's Avatar
 
Join Date: Feb 2006
Posts: 1,532

Submissions (4)

DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)

Send a message via ICQ to DioD
Default

UnitRemoveBuffsBJ

UnitCountBuffsExBJ

is bj functions with nice comment over params

tested - working

damn check gui first time is mana
Attached Images
File Type: jpg 123.JPG (23.4 KB, 30 views)
DioD is offline   Reply With Quote
Old 07-12-2009, 06:09 PM   #9
Deaod
User
 
Join Date: Jan 2007
Posts: 542

Submissions (11)

Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)

Default

DioD, im fully aware of that GUI function.

However, when i was testing the native with the debuff from 'Aslo' (Slow, human unit ability), it always returned "0", regardless of whether the buff was on the unit or not. I also set every boolean parameter of the function to true, but that didnt help as well. I concluded the native must be broken.

If you managed to get it working, please provide a test map, so i can figure out what im doing wrong.
__________________
Deaod is offline   Reply With Quote
Old 07-13-2009, 10:40 AM   #10
DioD
obey
 
DioD's Avatar
 
Join Date: Feb 2006
Posts: 1,532

Submissions (4)

DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)DioD is a jewel in the rough (220)

Send a message via ICQ to DioD
Default

There is test&debug map

you are free to use any precious stuff from it.

ofc i can rip buff test, but have not time for this.

engine\trigger18 do its job
Attached Files
File Type: w3x (12) Reaper's Way v0.011Beta2.w3x (153.6 KB, 12 views)
DioD is offline   Reply With Quote
Old 07-14-2009, 06:15 AM   #11
Deaod
User
 
Join Date: Jan 2007
Posts: 542

Submissions (11)

Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)

Default

alright, thanks for not giving up on me. I tracked the error down and eliminated it. You might want to remove the map.
__________________
Deaod is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 03:45 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services