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 > Resources > Code Resources > Systems
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 04-12-2009, 01:29 AM   #91
moyack
Evil Emoticon
 
moyack's Avatar


Respected User
Project Leader: PoC
 
Join Date: Jan 2006
Posts: 3,279

Submissions (17)

moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)

AI Tournament #2 - 2nd PlaceHero Contest - Second place

Send a message via MSN to moyack
Default

Quote:
Originally Posted by Troll-Brain
I'm agree with Rising_Dusk, and i'm also curious to see the damage detection code (i can't open a war3 map for the moment)
Ohhh, yes... it sounds like a reasonable condition but it's clear that the previous poster hasn't read the code properly. In order to achieve an almost perfect unit recycling, I had to use a damage detection code to detect when the unit is about to die instead of when the unit is actually dead, and at the same time the DD code requires to know if the units that it's going to add is in the group of units with the DD trigger. As you can see, they're mutually dependent, in private variables to make it safer and faster, so I can't separate them.

I offered optionally the DD code without Unit recycling, but this code leaks events when the units with DD dies (not a terrible thing as you should know). With the integration of Unit recycling, the event leaks is reduced to the minimum (buildings and summoned units don't work with recycling) because the normal units never die, they're reused.

About the DD code without Unit recycling, here it is with some examples...

Last edited by moyack : 04-12-2009 at 01:35 AM.
moyack is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 04-12-2009, 02:15 AM   #92
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

Quote:
Originally Posted by moyack
I had to use a damage detection code to detect when the unit is about to die instead of when the unit is actually dead
Hrm, I see. I hadn't really looked over the code, just going by the fact that everyone and their brother has basically said that it is okay for the database.

It would also be great if this system could 'require' the library of another DDS and make it work like that. It limits the portability of the system if it has a built in DDS. Maybe it could be 'okay' if the DDS really didn't do anything except interface with the Recycler system. (Then it wouldn't really be an external DDS)

Hrm.
__________________
Rising_Dusk is offline   Reply With Quote
Old 04-12-2009, 05:43 AM   #93
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

Quote:
Originally Posted by Cassiel
An option to run the recycler's DDS through another should solve any of those issues.
This, yes this could work.
__________________
Rising_Dusk is offline   Reply With Quote
Old 04-16-2009, 02:57 PM   #94
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

For summons I think it is easy to just trigger the summoning.

Buildings are more complicated, did you try adding chaos to a building so it becomes a movable unit? Though you would need to add chaos back.

I guess that damage detection on buildings is not that necessary and buildings have longer life spans than units so maybe it works.

The rest seems all right and I need to clean up the submit a resource forum, so approval bait.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 04-25-2009, 08:08 PM   #95
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (134)

Default

I guess you can't recycle an unit which explode on death, or be killed with a spell like finger of death ?
Just to know.
Troll-Brain is offline   Reply With Quote
Old 04-26-2009, 03:09 AM   #96
moyack
Evil Emoticon
 
moyack's Avatar


Respected User
Project Leader: PoC
 
Join Date: Jan 2006
Posts: 3,279

Submissions (17)

moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)

AI Tournament #2 - 2nd PlaceHero Contest - Second place

Send a message via MSN to moyack
Default

if a exploded unit or finger of death activates the EVENT_UNIT_DAMAGED triggers, then it can be recycled.
moyack is offline   Reply With Quote
Old 04-26-2009, 08:42 AM   #97
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (134)

Default

Quote:
Originally Posted by moyack
if a exploded unit or finger of death activates the EVENT_UNIT_DAMAGED triggers, then it can be recycled.
I don't want a theory, just the true :p
I think you can't recycle them since the unit is killed and his corpse is removed as well.
Could you test it plz ?

I could test it myself but you would take less time to test because you are the author of the code.
Troll-Brain is offline   Reply With Quote
Old 04-26-2009, 07:52 PM   #98
moyack
Evil Emoticon
 
moyack's Avatar


Respected User
Project Leader: PoC
 
Join Date: Jan 2006
Posts: 3,279

Submissions (17)

moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)

AI Tournament #2 - 2nd PlaceHero Contest - Second place

Send a message via MSN to moyack
Default

NOTE: You have been redirected in order for our attachments to be made available to you. This will only last two minutes; these measures where taken to avoid hotlinking and bandwidth theft.
To avoid these restrictions Log in or Register

Quote:
I don't want a theory, just the true :p
I think you can't recycle them since the unit is killed and his corpse is removed as well.
Could you test it plz ?
That's not a theory, is the way how this system works. DD activates the trigger when the unit is ABOUT to receive damage, not when it's received, and if any spell deals damage, this event will fire and therefore the unit will be treated by the system.

Quote:
I could test it myself but you would take less time to test because you are the author of the code.
Actually I'm very busy, but anyways I did a test map.

For your needs, it works with finger of Death, you just have to add a trigger to fix the eyecandy part (to see the difference, in the test map, disable the "Finger of Death Eyecandy" trigger and see how it looks, now enable it). The eyecandy fixer code:

Expand JASS:

About units being attacked by siege units, you can do something like this:

Expand JASS:
Attached Files
File Type: w3x test.w3x (26.7 KB, 15 views)
moyack is offline   Reply With Quote
Old 04-26-2009, 07:59 PM   #99
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (134)

Default

ok, thx for the test.
Troll-Brain is offline   Reply With Quote
Old 08-18-2009, 08:22 PM   #100
Ranger21
User
 
Join Date: Mar 2009
Posts: 8

Ranger21 has little to show at this moment (0)

Default

Sorry for post...

Just added TriggerSleepAction(0.0) To init and everything works fine.

Last edited by Ranger21 : 08-18-2009 at 08:40 PM.
Ranger21 is offline   Reply With Quote
Old 08-18-2009, 09:35 PM   #101
moyack
Evil Emoticon
 
moyack's Avatar


Respected User
Project Leader: PoC
 
Join Date: Jan 2006
Posts: 3,279

Submissions (17)

moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)

AI Tournament #2 - 2nd PlaceHero Contest - Second place

Send a message via MSN to moyack
Default

ok.
moyack is offline   Reply With Quote
Old 09-14-2009, 09:42 PM   #102
Themerion
Brahms-fan
 
Themerion's Avatar
 
Join Date: Jan 2006
Posts: 642

Submissions (2)

Themerion has a spectacular aura about (114)Themerion has a spectacular aura about (114)Themerion has a spectacular aura about (114)Themerion has a spectacular aura about (114)

Default

I've been thinking...
(oh no, not again!)

What's the performance cost of GroupEnumUnitsOfTypeCounted? You are using it for acquiring a unit from heaven of type X.

Let's say we have a group with 20 units * 20 types = 400 units. Will Warcraft manually check unit 1, unit 2, unit 3, etc...? If that's the case, wouldn't Hashing + (Linked lists OR groups) be a good alternative?

Expand JASS:
__________________
Submissions::
(v)JASS Tutorial
Covers how to make fast and safe coding for common tasks in vJASS/JASS.
Creep Respawn System
It has never been easier to respawn creep groups...

Last edited by Themerion : 09-14-2009 at 09:52 PM.
Themerion is offline   Reply With Quote
Old 09-18-2009, 11:32 PM   #103
Mr.Malte
User
 
Mr.Malte's Avatar
 
Join Date: Apr 2008
Posts: 286

Submissions (2)

Mr.Malte is on a distinguished road (11)

Default

Counted
means it only fills the group with 'Counted' units.
Mr.Malte is offline   Reply With Quote
Old 11-23-2009, 05:53 PM   #104
Themerion
Brahms-fan
 
Themerion's Avatar
 
Join Date: Jan 2006
Posts: 642

Submissions (2)

Themerion has a spectacular aura about (114)Themerion has a spectacular aura about (114)Themerion has a spectacular aura about (114)Themerion has a spectacular aura about (114)

Default

Quote:
Counted
means it only fills the group with 'Counted' units.

Yes, it's not really the counted that was my point, but UnitOfType. I wonder if Warcraft have to check unit1, unit2, unit3... etc. until it finds a unit of the right type; or if it has some smarter algorithm for it.
__________________
Submissions::
(v)JASS Tutorial
Covers how to make fast and safe coding for common tasks in vJASS/JASS.
Creep Respawn System
It has never been easier to respawn creep groups...
Themerion 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 07:29 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