• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

A couple minor questions

Status
Not open for further replies.
Level 9
Joined
Jun 7, 2008
Messages
440
This really has nothing do with scripting or triggering. I made a reference earlier (much earlier) to filters/bool exp.

I was wondering, with these functions how would you filter out the proper units?

for instance, using this:
JASS:
call GroupEnumUnitsInRect(g, gg_rct_TemP_LoC, //filterGetUnitsInRectOfPlayer\\)

Say If I wanted player 4, How would I call that in this trigger?

Another question; Is there a tutorial for each function in THW for jngp?
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
JASS:
function unitFilter takes nothing returns boolean
        local unit u = GetFilterUnit()
        // Player(3) = Player 4
        if GetOwningPlayer(u) == Player(3) and not(IsUnitType( u , UNIT_TYPE_DEAD )) then
               *do yer things here*
        endif 
        set u = null
        return false
endfunction


function something blah blag
...
call GroupEnumUnitsInRect(g, gg_rct_TemP_LoC, function unitFilter)
...
endfunction
 
Status
Not open for further replies.
Top