(Keeps Hive Alive)
Go Back   The Hive Workshop - A Warcraft III Modding Site > Warcraft III Resources > JASS Functions

JASS Functions Approved JASS functions will be located here.
Remember to submit your own resources to the submission forum.

Reply
 
LinkBack Thread Tools Display Modes
Old 05-20-2008, 10:35 AM   #31 (permalink)

User
 
Join Date: Mar 2006
Posts: 362

apocalypse_dude has little to show at this moment (3)


sorry for digging this out but i would like to know if i can use this as a very frequent event lets say like every second
how much would that influence the overall performance ? may it cause lagg along with other functions ?
I dont know much about jass so i cant really guess it myself
__________________
From the ashes of this golden age of confusion, the denim recruits came to be known as the apocalypse dudes
apocalypse_dude is offline   Reply With Quote
Old 05-20-2008, 01:25 PM   #32 (permalink)

User
 
Join Date: Mar 2005
Posts: 230

DiscipleOfLife is on a distinguished road (71)DiscipleOfLife is on a distinguished road (71)


Only once per second shouldn't be a problem at all, unless you have several hundreds of units that need to be searched through to find the closest one. Generally it is best to use the function that goes through the least amount of units possible, for example GetClosestUnitInRange instead of GetClosestUnit whenever the range limit doesn't bother you.

EDIT:
New version 1.3 is now up. Its GetClosestUnit most often avoids going through all units on the map unlike the old one, thus the new one should be a lot faster on maps with a lot of units in it.
__________________

Last edited by DiscipleOfLife; 05-24-2008 at 05:36 PM..
DiscipleOfLife is offline   Reply With Quote
Old 06-12-2008, 11:34 AM   #33 (permalink)
Registered User crl
 
crl's Avatar

User
 
Join Date: Mar 2008
Posts: 66

crl has little to show at this moment (1)


Information

Quote:
Originally Posted by JoHnyW View Post
sorry for such stupid question delete this post if i shouldn ask but i want to know what are closest units ?
ROTFLOL

closest unit=the closest unit to the point
close=near
unit=soldier/building/creep/worker/...
__________________
<<--Click to hatch me/help me grow/look better at me :-)
My dragons
crl is offline   Reply With Quote
Old 06-28-2008, 07:41 AM   #34 (permalink)
 
Xeridanus's Avatar

User
 
Join Date: Dec 2004
Posts: 319

Xeridanus is an unknown quantity at this point (0)


this may be a dumb question but, what's the difference between vJassless and the normal one?
__________________
Talking to yourself is a sign of genius, answering back is a sign of insanity. -Albert Einstein

Corn is no place for a mighty warrior!

http://www.wc3sear.ch/viewtopic.php?...er=asc&start=0
Xeridanus is offline   Reply With Quote
Old 06-28-2008, 11:25 AM   #35 (permalink)

User
 
Join Date: Mar 2005
Posts: 230

DiscipleOfLife is on a distinguished road (71)DiscipleOfLife is on a distinguished road (71)


The normal version requires you to have jasshelper whereas the vJassless doesn't, but on the other hand when importing the vJassless version you have to create a few global variables with the Trigger Editor's variable editor.

The current versions of both of the systems (1.3.1) are identical when it comes to performance and functionality, except that the normal version is in a library called GCU and thus can be required by other libraries.
__________________
DiscipleOfLife is offline   Reply With Quote
Old 07-11-2008, 07:34 PM   #36 (permalink)
 
Herman's Avatar

Me in a few words???
 
Join Date: Aug 2007
Posts: 949

Herman has little to show at this moment (40)Herman has little to show at this moment (40)Herman has little to show at this moment (40)Herman has little to show at this moment (40)Herman has little to show at this moment (40)


Damn, I made my own version of this using 3D, and just getclosestofgroup, as it seemed to be the most generic + efficient way to use the function for each situation

I didn't even think about using ForGroup()

I think you might want to add in a 3D version too, just incase your working with projectiles and the such
__________________
77% of all people are neurotic
Herman is offline   Reply With Quote
Old 07-11-2008, 09:51 PM   #37 (permalink)
 
Silvenon's Avatar

BBoy Silv
 
Join Date: Nov 2006
Posts: 866

Silvenon is on a distinguished road (81)Silvenon is on a distinguished road (81)


Quote:
I think you might want to add in a 3D version too, just incase your working with projectiles and the such
Nobody cares for the third dimension in wc3 because there are many algorithms and calculations when working in 3D plus it's very possible that you'll never get it right...... it's just not worth it and it doesn't make much difference.

But you can post your 3D version if you know how to make it :)
__________________
PurgeandFire111: Then you can delete the sound and whala... You have the label,filepath, and other parameters.
Silvenon: It's voila, not whala, you... stupidhead :)
PurgeandFire111: Yeah, I was in a rush. =( *cry*
Herman: Voila is an instrument that I quit playing in 6th grade, whala works just fine if not better
PurgeandFire111: No, viola is an instrument. Stupidhead... =D
Silvenon is offline   Reply With Quote
Old 07-12-2008, 08:19 PM   #38 (permalink)
 
Herman's Avatar

Me in a few words???
 
Join Date: Aug 2007
Posts: 949

Herman has little to show at this moment (40)Herman has little to show at this moment (40)Herman has little to show at this moment (40)Herman has little to show at this moment (40)Herman has little to show at this moment (40)


For a 3-D GetClosestUnit, all you need to do is add another real parameter for the Z, and incorporate the Z calculations for the pythagorean theroem, instead of x*x + y*y = d*d, it becomes x*x + y*y + z*z = d*d

Ok, I will post a 3D version, for this specific case, it is much more simple than using any crazy algorithms
__________________
77% of all people are neurotic
Herman is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[JASS] GetClosestUnit problem Silvenon Triggers & Scripts 33 09-13-2007 07:48 PM

All times are GMT. The time now is 08:05 AM.






Your link here 
Mobile Phones | Die Casting Company | Coupon Codes | Credit Cards | Bankruptcy
Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Copyright©Ralle