• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

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?
 
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.
Back
Top