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



Reply
 
Thread Tools Search this Thread
Old 11-03-2009, 09:11 PM   #16
StealthOfKing
User
 
Join Date: May 2007
Posts: 19

StealthOfKing has little to show at this moment (0)

Default

I see, I had little time to test it but made those assumptions from the debugs I already had in place. Good job on fast update and thanks for fully researching this! As you said in AutoIndex update post, the chances of it causing a problem are minimal but I thought I would bring it to the attention of users all the same.
StealthOfKing is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 11-03-2009, 11:55 PM   #17
PsycoMarauder
User
 
PsycoMarauder's Avatar
 
Join Date: Jun 2006
Posts: 94

PsycoMarauder has little to show at this moment (3)

Send a message via AIM to PsycoMarauder
Default

Grim, does this work for units that are unloaded via a click on their icon while inside a transport ship?
PsycoMarauder is offline   Reply With Quote
Old 11-04-2009, 01:07 AM   #18
grim001
requires vJass
 
grim001's Avatar


Code Moderator
 
Join Date: Nov 2006
Posts: 1,540

Submissions (10)

grim001 is just really nice (277)grim001 is just really nice (277)

Send a message via AIM to grim001
Default

Quote:
Originally Posted by PsycoMarauder
Grim, does this work for units that are unloaded via a click on their icon while inside a transport ship?

Yes.
grim001 is offline   Reply With Quote
Old 11-20-2009, 04:06 AM   #19
grim001
requires vJass
 
grim001's Avatar


Code Moderator
 
Join Date: Nov 2006
Posts: 1,540

Submissions (10)

grim001 is just really nice (277)grim001 is just really nice (277)

Send a message via AIM to grim001
Default

Updated.
  • Removed the need for StatusEvents to register an EVENT_PLAYER_UNIT_ISSUED_ANY_ORDER event by piggybacking off AutoIndex's using an optional textmacro. This should be a decent performance upgrade since it is an event that fires very frequently.
  • Code improvements.
  • Documentation improvements.

I'm taking a poll, should I rename this to AutoEvents?

Last edited by grim001 : 11-20-2009 at 12:36 PM.
grim001 is offline   Reply With Quote
Old 11-21-2009, 10:39 AM   #20
D3zmodos
User
 
Join Date: Feb 2009
Posts: 13

D3zmodos has little to show at this moment (8)

Default

I vote yes because it's not actually got anything to do with status? (imo status is like hp or mana...or stunned or slowed..that kinda thing)
D3zmodos is offline   Reply With Quote
Old 12-08-2009, 06:16 AM   #21
grim001
requires vJass
 
grim001's Avatar


Code Moderator
 
Join Date: Nov 2006
Posts: 1,540

Submissions (10)

grim001 is just really nice (277)grim001 is just really nice (277)

Send a message via AIM to grim001
Default

A few changes since the last time I mentioned anything:
  • Name was changed to AutoEvents because it makes more sense and implies more of a connection with AutoIndex.
  • Now compiles when using [forcemethodevaluate]; several unneeded triggerevaluates were removed.
  • Updated to compile with the latest version of AutoIndex.
grim001 is offline   Reply With Quote
Old 01-06-2010, 11:51 AM   #22
Tyrande_ma3x
User
 
Tyrande_ma3x's Avatar
 
Join Date: Feb 2009
Posts: 185

Submissions (1)

Tyrande_ma3x is on a distinguished road (12)

Default

In the documentation you gave this example:

Collapse JASS:
//     The following examples use the AutoEvent function interface:
//
// function UnitDies takes unit u returns nothing
//     call BJDebugMsg(GetUnitName(u)+" has died.")
// endfunction
//
// function UnitResurrects takes unit u returns nothing
//     call BJDebugMsg(GetUnitName(u)+" has been resurrected.")
// endfunction
//
// function Init takes nothing returns nothing
//     call OnUnitDeath(UnitDies)
//     call OnUnitResurrect(UnitResurrects)
// endfunction

Can I make my UnitDies functions private in my scope/library or to they necessarily have to be regular visible functions?
Tyrande_ma3x is offline   Reply With Quote
Old 01-06-2010, 12:32 PM   #23
grim001
requires vJass
 
grim001's Avatar


Code Moderator
 
Join Date: Nov 2006
Posts: 1,540

Submissions (10)

grim001 is just really nice (277)grim001 is just really nice (277)

Send a message via AIM to grim001
Default

Quote:
Originally Posted by Tyrande_ma3x
Can I make my UnitDies functions private in my scope/library or to they necessarily have to be regular visible functions?
It is just standard function interface usage here, which works fine with private functions.
grim001 is offline   Reply With Quote
Old 01-28-2010, 12:54 PM   #24
grim001
requires vJass
 
grim001's Avatar


Code Moderator
 
Join Date: Nov 2006
Posts: 1,540

Submissions (10)

grim001 is just really nice (277)grim001 is just really nice (277)

Send a message via AIM to grim001
Default

Updated.
  • Improved readability, comments, and encapsulation in some areas of the code.
  • Removed the need for several optional textmacros injected into AutoIndex.
grim001 is offline   Reply With Quote
Old 02-05-2010, 06:12 PM   #25
grim001
requires vJass
 
grim001's Avatar


Code Moderator
 
Join Date: Nov 2006
Posts: 1,540

Submissions (10)

grim001 is just really nice (277)grim001 is just really nice (277)

Send a message via AIM to grim001
Default

Updated.
  • Fixed a rare bug where paused units would not be noticed unloading.
  • Switched to a completely different style of unload detection that doesn't piggyback off AutoIndex. As a result, performance has been improved and the code is now perfectly encapsulated.
grim001 is offline   Reply With Quote
Old 04-28-2010, 10:42 AM   #26
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 705

Submissions (1)

Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)

Send a message via MSN to Fledermaus
Default

There's a bug in the ReincarnationStart event (if you have 1 or more ReincarnationStart events registered) that makes it run them until the unit reincarnates.

Expand JASS:

They're both using 'n' and the textmacro increases it which counteracts the loop decreasing it.



Also, the Transport unload event is registered in the filter function so (for me at least) it runs before the unit has been indexed.
call TriggerRegisterEnterRegion(unload, maparea, Condition(function Transport.unitEntersMap))

Last edited by Fledermaus : 04-28-2010 at 01:55 PM.
Fledermaus is offline   Reply With Quote
Old 05-28-2010, 01:05 PM   #27
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 705

Submissions (1)

Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)

Send a message via MSN to Fledermaus
Default

Another minor bug, in the DeathDetect function you should check if the unit is indexed before setting the Reincarnated[GetUnitId(GetTriggerUnit())] to false.
While it wont actually break anything, it will still throw AutoIndex errors ("AutoIndex error: "+GetUnitName(u)+" is a filtered unit.") in debug mode if you have any unit types filtered out and can be very annoying when you think it's something you've done wrong :p

Last edited by Fledermaus : 05-28-2010 at 01:06 PM.
Fledermaus is offline   Reply With Quote
Old 05-29-2010, 09:54 AM   #28
D3zmodos
User
 
Join Date: Feb 2009
Posts: 13

D3zmodos has little to show at this moment (8)

Default

How about allowing the user to choose which bits of AutoEvents he wants to use (like ABuff, so you could choose if you want to disabled the detection/actions associated with reincarnation/transports etc)

This is just because, say now you have a map with a lot of units moving in/out of the map, but none of them ever get used as a transport, and none of them ever get reincarnated, then wouldnt it be a fair waste of processing power/game traffic to be detecting these things and attempting to respond?
D3zmodos is offline   Reply With Quote
Old 03-25-2011, 12:11 PM   #29
Bribe
User
 
Bribe's Avatar
 
Join Date: Mar 2010
Posts: 233

Submissions (1)

Bribe will become famous soon enough (30)Bribe will become famous soon enough (30)

Send a message via AIM to Bribe
Default

The transport unload-detection bugs, BoundSentinel by Vexorian or a Knockback system will prematurely fire the unload event.

The issue is addressed here: http://www.hiveworkshop.com/forums/s...oevent-192251/

Last edited by Bribe : 03-25-2011 at 12:11 PM.
Bribe 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 04:54 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