• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How do i array in Jass?

Status
Not open for further replies.
Level 20
Joined
Jan 6, 2008
Messages
2,627
Okay, thanks, but im getting a new error:

JASS:
        call TriggerRegisterTrackableTrackEvent( gg_trg_Test2, Track[GetForLoopIndexA()] )

it says
Undecleared variable: Track
Comparing two variables of different primitive types (except real and integer) is not allowed
 
Level 20
Joined
Jan 6, 2008
Messages
2,627
tyvm ;D
EDIT: I cant seem to find out how to find the trackable's location, i need it abit more less whit the x aswell

JASS:
function Trig_Track_Func001Func001C takes nothing returns boolean
    if ( not ( GetTriggeringTrackable() == Track[GetForLoopIndexA()] ) ) then
        return false
    endif
    return true
endfunction

function Trig_Track_Actions takes nothing returns nothing
    set bj_forLoopAIndex = 1
    set bj_forLoopAIndexEnd = 999
    loop
        exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
        if ( Trig_Track_Func001Func001C() ) then
            call DestroyTextTagBJ( udg_TrackText )
            call CreateTextTagLocBJ( udg_TrackString[GetForLoopIndexA()], GetRectCenter(GetPlayableMapRect()), 0, 10, 100, 100, 100, 0 )
            set udg_TrackText = GetLastCreatedTextTag()
        else
        endif
        set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
endfunction

//===========================================================================
function InitTrig_Track takes nothing returns nothing
    set gg_trg_Track = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Track, function Trig_Track_Actions )
endfunction

the
JASS:
            call CreateTextTagLocBJ( udg_TrackString[GetForLoopIndexA()], GetRectCenter(GetPlayableMapRect()), 0, 10, 100, 100, 100, 0 )
part
 
Last edited:
Status
Not open for further replies.
Top