Jass Filter function

Yoww89

New Member
Reaction score
0
Can someone help me with this one from the start?
What does it have to do with GetEnumUnit() and GetFilterUnit()?

As I searched everywhere for some kind of tutorial and found nothing but discussions about its applications that I can't use to understand the basics of it.
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
You only use [ljass]GetEnumUnit[/ljass] when you're using [ljass]ForGroup[/ljass], which is a function that loops through every unit in the group passed to it, and calls the function passed to it. You then refer to each unit one at a time with that function.

[ljass]GetFilterUnit[/ljass] is used for other unit iteration, such as GroupEnumUnit* functions, amongst others. Essentially, the function passed to any of these functions is called. Then, inside that function, you check the Filter Unit, and if it matches some condition you want (e.g. you DO want it in the group), you return true. Otherwise, you return false. The wiki has code examples and use cases for group enumeration.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • jonas jonas:
    Cool, enjoy your vacation!
  • The Helper The Helper:
    Have a great vacation Tom!
  • The Helper The Helper:
    Happy Friday Night!
    +1
  • V-SNES V-SNES:
    Happy Friday Night!
    +1
  • The Helper The Helper:
    Going out of a town for the weekend will be back sunday night! Hope everyone has a great weekend!
    +2
  • The Helper The Helper:
    Happy Monday!
  • Ghan Ghan:
    Monday? Speak for yourself. :p
    +2
  • The Helper The Helper:
    Happy Taco Tuesday!
    +1
  • The Helper The Helper:
    Tacos! :)
  • The Helper The Helper:
    Check out the discord for taco pictures :) You cannot put pictures in this chat
    +1
  • The Helper The Helper:
    Damn here come the bots again - 193 online but they are totally invisible to any stats - bunch of bots!'
  • C cubanismo:
    Re: Taco Tuesday, if there were some way to share edible tacos over the internet, technology would be complete.
    +2
  • The Helper The Helper:
    One can only wish!
  • tom_mai78101 tom_mai78101:
    I'm back from Taiwan
    +1
  • The Helper The Helper:
    I am reorganizing the site I know nobody will notice but I am not done quite yet but the main forums order has been changed and there is a new news category in Other News which is all the remaining headline news stuff not categorized - Headline News is just the stuff that shows on the main page now and the news archive is off the main forums page
  • The Helper The Helper:
    and the real archive lives off of headline news

    The Helper Discord

    Members online

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top