[Log in / Register]
| News | Chat | Pastebin | Donations | Tutorials | Rules | Forums |
| Maps | Skins | Icons | Models | Spells | Tools | Jass | Packs | Hosted Projects | Starcraft II Modding | Starcraft II Resources | Galaxy Wiki |
(Keeps Hive Alive)
Go Back   The Hive Workshop > Warcraft III Modding > JASS Resources


JASS Resources Find JASS code snippets and functions here or write your own and post it on the Submissions sub-forum.

Reply
 
Thread Tools
Old 06-09-2012, 05:32 AM   #46 (permalink)
Registered User Cokemonkey11
\m/
 
Cokemonkey11's Avatar
 
Join Date: May 2006
Posts: 1,985
Cokemonkey11 is just really nice (338)Cokemonkey11 is just really nice (338)Cokemonkey11 is just really nice (338)
Quote:
Originally Posted by Bribe View Post
To get it approved? Someone has to move the thread to the JASS Resources forum.
Thanks for the sarcasm. Let me try again. What constitutes a submission worthy of the JASS Resources forum?

Quote:
To get it reviewed is something different. I could approve this but it is still "another damage detection system" to join the ranks of far too many to keep track of.
Instead of explaining why this is different/better than other public resources, I'm just going to say that it's not your job to keep track of these systems. The question is "Is the resource useful?"

Quote:
Also, to respond to the Unitalive/IsUnitType thing, they both return the same when a unit is resurrecting.
Thanks, but I was more curious about which one is less computationally expensive.
Cokemonkey11 is offline   Reply With Quote
Old 06-09-2012, 05:46 AM   #47 (permalink)
Registered User Nestharus
User
 
Nestharus's Avatar
 
Join Date: Jul 2007
Posts: 4,904
Nestharus has disabled reputation
I already stated why this resource might be used. It allows users to pick their own libraries and allows users to register groups of units. However, with this, it is harder to use. Furthermore, it could use improvement (see DamageEvent).

That is all.
__________________

Anime-Planet.com - anime | manga | reviews
Nestharus is online now   Reply With Quote
Old 06-13-2012, 08:49 AM   #48 (permalink)
Forum Moderator Bribe
Keep it simple
 
Bribe's Avatar
Spells, Help Zones & JASS Moderator
 
Join Date: Sep 2009
Posts: 5,581
Bribe has much of which to be proud (1209)Bribe has much of which to be proud (1209)
PayPal Donor: This user has donated to The Hive. 
This is another approach to the complex situation of damage detection. Approved.
__________________
How to post your triggers on the Hive Workshop.
JPAG - Bettering the cause of readable source code.

Bribe is offline   Reply With Quote
Old 06-14-2012, 11:03 AM   #49 (permalink)
Registered User Mr_Bean
Where's Teddy?
 
Mr_Bean's Avatar
 
Join Date: Feb 2011
Posts: 1,593
Mr_Bean is a jewel in the rough (238)Mr_Bean is a jewel in the rough (238)Mr_Bean is a jewel in the rough (238)
Techtree Contest #7 - Winner: The Ancients and The Old One: The incarnation of the World Tree as a Super Unit commences the tides of battle. Nature has found its most precious avenger! A race by Lordkoon & Mr_Bean987. 
Hi. I'm not great with damage detection stuff, but is there a way to detect only physical attacks with this system?

EDIT: I tried it with a Paladin casting Holy Light on an Acoltye. The result messages:

Paladin dealt 0.000 damage to: Acolyte
Paladin dealt 100.000 damage to: Acolyte
__________________
Mr_Bean's Spell Workshop
- Looking for people to help with GUI & vJASS requests.
- Need help importing your request? Try this guide I wrote!
Mr_Bean is offline   Reply With Quote
Old 06-14-2012, 04:07 PM   #50 (permalink)
Registered User Cokemonkey11
\m/
 
Cokemonkey11's Avatar
 
Join Date: May 2006
Posts: 1,985
Cokemonkey11 is just really nice (338)Cokemonkey11 is just really nice (338)Cokemonkey11 is just really nice (338)
Quote:
Originally Posted by Mr_Bean987 View Post
Hi. I'm not great with damage detection stuff, but is there a way to detect only physical attacks with this system?
Not that I know of :D Sorry I'm sure that wasn't the answer you were hoping for.

Quote:
EDIT: I tried it with a Paladin casting Holy Light on an Acoltye. The result messages:

Paladin dealt 0.000 damage to: Acolyte
Paladin dealt 100.000 damage to: Acolyte
That's pretty weird, you used the test scope with ADD_ALL_UNITS = true and didn't make another trigger for adding units? Regardless, if you didn't it would just display the same line twice. This looks more like something specific to holy light, maybe due to the allied/enemy duality involved with the spell.
Cokemonkey11 is offline   Reply With Quote
Old 06-14-2012, 04:16 PM   #51 (permalink)
Registered User Mr_Bean
Where's Teddy?
 
Mr_Bean's Avatar
 
Join Date: Feb 2011
Posts: 1,593
Mr_Bean is a jewel in the rough (238)Mr_Bean is a jewel in the rough (238)Mr_Bean is a jewel in the rough (238)
Techtree Contest #7 - Winner: The Ancients and The Old One: The incarnation of the World Tree as a Super Unit commences the tides of battle. Nature has found its most precious avenger! A race by Lordkoon & Mr_Bean987. 
Quote:
Not that I know of :D Sorry I'm sure that wasn't the answer you were hoping for.
:O nooooo!

Quote:
That's pretty weird, you used the test scope with ADD_ALL_UNITS = true and didn't make another trigger for adding units? Regardless, if you didn't it would just display the same line twice. This looks more like something specific to holy light, maybe due to the allied/enemy duality involved with the spell.
Yes, I used your test scope and only the test scope. I will try it with another spell and see what happens.
__________________
Mr_Bean's Spell Workshop
- Looking for people to help with GUI & vJASS requests.
- Need help importing your request? Try this guide I wrote!
Mr_Bean is offline   Reply With Quote
Old 08-23-2012, 12:58 AM   #52 (permalink)
Registered User wiredbomb0
User
 
Join Date: Apr 2009
Posts: 20
wiredbomb0 has little to show at this moment (5)
Alright, this is just beautiful! I've got it to work on my map without any issues (I've haven't got any spells to test but I'll let you know how those turn out). I'm just wondering, will these events still fire if a UnitDamageTarget or similar event? and just out of curiosity, is there anyway to get the damage type of the damage dealt?
wiredbomb0 is offline   Reply With Quote
Old 08-24-2012, 06:04 AM   #53 (permalink)
Registered User Cokemonkey11
\m/
 
Cokemonkey11's Avatar
 
Join Date: May 2006
Posts: 1,985
Cokemonkey11 is just really nice (338)Cokemonkey11 is just really nice (338)Cokemonkey11 is just really nice (338)
Hi wiredbomb0, I'm glad you've found use for this!

I don't have a wc3 developing environment on my active machine so I can't test/recall these answers for you, however:
  1. UnitDamageTarget should be detected
  2. Damage Dealt type is not possible to detect with wc3's natives, but you might consider looking for a system that attempts to do it!

Good luck
Cokemonkey11 is offline   Reply With Quote
Old 08-24-2012, 11:33 AM   #54 (permalink)
Registered User baassee
MORE CONTESTS PLS
 
baassee's Avatar
 
Join Date: Nov 2008
Posts: 3,554
baassee is a splendid one to behold (845)baassee is a splendid one to behold (845)baassee is a splendid one to behold (845)baassee is a splendid one to behold (845)baassee is a splendid one to behold (845)
Quote:
Originally Posted by Mr_Bean987 View Post
Hi. I'm not great with damage detection stuff, but is there a way to detect only physical attacks with this system?

EDIT: I tried it with a Paladin casting Holy Light on an Acoltye. The result messages:

Paladin dealt 0.000 damage to: Acolyte
Paladin dealt 100.000 damage to: Acolyte
Cause holy light does damage to undeads...
__________________
Nobody dies a virgin, life fucks us all. - Master Arena is alive! v4.0 in construction. - Dr Super Good for president! - Sorry derps but I do not do requests unless they prove themselves worthy of my time.
My Resources! - Help me out with my project! - How To Import vJASS spells tutorial! - Practice makes perf... improves you.
Quote:
Originally Posted by Marc Mamales View Post
Hey guys, please fix my spells, cz i dont know how to make it GUI.
baassee is offline   Reply With Quote
Old 08-24-2012, 12:14 PM   #55 (permalink)
Forum Moderator Bribe
Keep it simple
 
Bribe's Avatar
Spells, Help Zones & JASS Moderator
 
Join Date: Sep 2009
Posts: 5,581
Bribe has much of which to be proud (1209)Bribe has much of which to be proud (1209)
PayPal Donor: This user has donated to The Hive. 
That makes sense. There are often times in the game where units receive 0.000 damage (for example when the Faerie Fire spell is cast).
__________________
How to post your triggers on the Hive Workshop.
JPAG - Bettering the cause of readable source code.

Bribe is offline   Reply With Quote
Old 08-24-2012, 01:21 PM   #56 (permalink)
Registered User baassee
MORE CONTESTS PLS
 
baassee's Avatar
 
Join Date: Nov 2008
Posts: 3,554
baassee is a splendid one to behold (845)baassee is a splendid one to behold (845)baassee is a splendid one to behold (845)baassee is a splendid one to behold (845)baassee is a splendid one to behold (845)
Quote:
Originally Posted by Bribe View Post
That makes sense. There are often times in the game where units receive 0.000 damage (for example when the Faerie Fire spell is cast).
Exactly so I bet it first triggers healing and if it is undead then it does damage instead. Yet the check itself 0. damage I do wonder why
__________________
Nobody dies a virgin, life fucks us all. - Master Arena is alive! v4.0 in construction. - Dr Super Good for president! - Sorry derps but I do not do requests unless they prove themselves worthy of my time.
My Resources! - Help me out with my project! - How To Import vJASS spells tutorial! - Practice makes perf... improves you.
Quote:
Originally Posted by Marc Mamales View Post
Hey guys, please fix my spells, cz i dont know how to make it GUI.
baassee is offline   Reply With Quote
Old 08-24-2012, 06:05 PM   #57 (permalink)
Forum Moderator Magtheridon96
JESUS MAN
 
Magtheridon96's Avatar
Resource Moderator
 
Join Date: Dec 2008
Posts: 5,693
Magtheridon96 has a brilliant future (1805)
Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. 
I think it's because they just call a "deal damage" function and lookup the damage using a function that determines how much needs to be done given the type.
That function would return 0, and hence, 0 damage is dealt, and it fires an event.
__________________
Magtheridon96 is offline   Reply With Quote
Old 08-30-2012, 11:24 PM   #58 (permalink)
Registered User gorillabull
still using waits
 
gorillabull's Avatar
 
Join Date: Jul 2011
Posts: 934
gorillabull is a jewel in the rough (162)
Quote:
Originally Posted by wiredbomb0 View Post
... and just out of curiosity, is there anyway to get the damage type of the damage dealt?
it is more efficient to have every unit's damage type preset into a variable and to trigger the rest of the damage, if you think about it most of the time there are several different groups of units. for example you can have 20 footmen or 10 archers there is no point getting every unit's damage type and even if you get the damage type of a group of units there is still no need to make a system which detects something as constant as damage type as for triggered damage, that can easily be detected what type it is by using integer comparisons so since there is no native to get the damage type you will have to set it manually, if there was a system it will only save you about 4-5 minutes of work
gorillabull is offline   Reply With Quote
Old 01-18-2013, 08:45 AM   #59 (permalink)
Registered User Cokemonkey11
\m/
 
Cokemonkey11's Avatar
 
Join Date: May 2006
Posts: 1,985
Cokemonkey11 is just really nice (338)Cokemonkey11 is just really nice (338)Cokemonkey11 is just really nice (338)
I've updated this system with a big improvement to the code including:
  • No more support for useless things like DEAD_UNITS_ARE_NULL. If you need that kind of optimization, you can remove dead units yourself in a separate trigger.
  • Improved and shortened the API substantially.
  • Improved code commenting with document style explanations for each function.
  • Fixed a massive bug in the add function.
  • Paved the way for a coming DamageType extension.

I am curious if anyone is interested in extended support for things like:
  • Deallocating handlers
  • Registering special buckets for units that are never removed (eg heroes)
  • Included "safe" damage target by code functions (will be included regardless in the DamageType extension)
  • Introducing priority handlers that will occur sooner than others

Cheers,

Last edited by Cokemonkey11; 01-18-2013 at 11:27 AM.
Cokemonkey11 is offline   Reply With Quote
Old 01-19-2013, 07:25 PM   #60 (permalink)
Registered User edo494
User
 
edo494's Avatar
 
Join Date: Apr 2012
Posts: 978
edo494 is a jewel in the rough (202)edo494 is a jewel in the rough (202)
deallocating handlers sounds good, sometimes I want to detect something only for certain time but I still can lock the function with boolean(it will not prevent it from running tho)
priority handler hm...I dont care really but there are situations where you want something to happen before something else
the rest I dont really care, I wouldnt find use to those but maybe there are people that would

by the way, I have one question, since you mentioned it detects UnitDamageTarget, will this cause infinite loop?
Jass:
scope a initializer init
    private function handler takes nothing returns nothing
        call UnitDamageTarget(GetTriggerUnit(), GetEventDamageSource(), ...)
    endfunction

    private function init takes nothing returns nothing
        call StructuredDD_ddbucket.addHandler(function handler) //or how :D(too lazy to chcek correct syntax)
    endfunction
endscope
?
__________________
my resources
GetLastCastAbility, Reputation System(Awaiting approval), GetKiller(Awaiting approval), Spell Steal
[22-00-51] Geries: edo494, no
[22-00-57] Geries: edo494, but I'm gay
edo494 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 08:57 PM.





Powered by vBulletin
Copyright 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.1 PL2
Copyright © Ralle