• 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.

Array kindof problem (vJass + Gui)

Status
Not open for further replies.
Level 20
Joined
Jan 6, 2008
Messages
2,627
Title says it all, i use trackables with the codes 1-14, i need to use nr 1, in my case my Weapon slot.

The trackables work fine, i only need to gui the rest ;D

  • SystemIni
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across (Playable map area)
      • Camera - Apply Camera 004 <gen> for Player 1 (Red) over 0.00 seconds
      • For each (Integer A) from 1 to 1, do (Actions)
        • Loop - Actions
          • -------- - --------
          • Set TrackString[1] = Weapon Slot
          • Set ItemSLOTtext[1] = -Empty-
          • Set ItemRows[1] = 1
          • Set ItemTextRow[1] = 1
          • Set ItemDestructibles[1] = Empty Slot
          • -------- - --------
          • Set TrackString[2] = Shield Slot
          • Set ItemSLOTtext[2] = -Empty-
          • Set ItemRows[2] = 1
          • Set ItemTextRow[2] = 1
          • Set ItemDestructibles[2] = Empty Slot
          • -------- - --------
          • Set TrackString[3] = Exit
          • Set ItemSLOTtext[3] = Exit's to game
          • Set ItemRows[3] = 1
          • Set ItemTextRow[3] = 1
          • Set ItemDestructibles[3] = Exit
          • -------- - --------
          • Set TrackString[4] = Head Slot
          • Set ItemSLOTtext[4] = -Empty-
          • Set ItemRows[4] = 1
          • Set ItemTextRow[4] = 1
          • Set ItemDestructibles[4] = Empty Slot
          • -------- - --------
          • Set TrackString[5] = Shoulder Slot
          • Set ItemSLOTtext[5] = -Empty-
          • Set ItemRows[5] = 1
          • Set ItemTextRow[5] = 1
          • Set ItemDestructibles[5] = Empty Slot
          • -------- - --------
          • Set TrackString[6] = Necklace Slot
          • Set ItemSLOTtext[6] = -Empty-
          • Set ItemRows[6] = 1
          • Set ItemTextRow[6] = 1
          • Set ItemDestructibles[6] = Empty Slot
          • -------- - --------
          • Set TrackString[7] = Chest Slot
          • Set ItemSLOTtext[7] = -Empty-
          • Set ItemRows[7] = 1
          • Set ItemTextRow[7] = 1
          • Set ItemDestructibles[7] = Empty Slot
          • -------- - --------
          • Set TrackString[8] = Wrist Slot
          • Set ItemSLOTtext[8] = -Empty-
          • Set ItemRows[8] = 1
          • Set ItemTextRow[8] = 1
          • Set ItemDestructibles[8] = Empty Slot
          • -------- - --------
          • Set TrackString[9] = Hand Slot
          • Set ItemSLOTtext[9] = -Empty-
          • Set ItemRows[9] = 1
          • Set ItemTextRow[9] = 1
          • Set ItemDestructibles[9] = Empty Slot
          • -------- - --------
          • Set TrackString[10] = Belt Slot
          • Set ItemSLOTtext[10] = -Empty-
          • Set ItemRows[10] = 1
          • Set ItemTextRow[10] = 1
          • Set ItemDestructibles[10] = Empty Slot
          • -------- - --------
          • Set TrackString[11] = Boot's Slot
          • Set ItemSLOTtext[11] = -Empty-
          • Set ItemRows[11] = 1
          • Set ItemTextRow[11] = 1
          • Set ItemDestructibles[11] = Empty Slot
          • -------- - --------
          • Set TrackString[12] = Ring Slot
          • Set ItemSLOTtext[12] = -Empty-
          • Set ItemRows[12] = 1
          • Set ItemTextRow[12] = 1
          • Set ItemDestructibles[12] = Empty Slot
          • -------- - --------
          • Set TrackString[13] = Ring Slot
          • Set ItemSLOTtext[13] = -Empty-
          • Set ItemRows[13] = 1
          • Set ItemTextRow[13] = 1
          • Set ItemDestructibles[13] = Empty Slot
          • -------- - --------
      • For each (Integer A) from 1 to 1, do (Actions)
        • Loop - Actions
          • -------- 15-200 --------
          • Set TrackString[15] = Searing Blade
          • Set ItemSLOTtext[15] = No Info
          • Set ItemRows[15] = 1
          • Set ItemTextRow[15] = 1
          • Set ItemDestructibles[15] = Searing Blade
          • Set InvsystemItems[15] = Searing Blade
          • Set ItemSlot[15] = 1
          • -------- - --------
      • For each (Integer A) from 1 to 200, do (Actions)
        • Loop - Actions
          • Multiboard - Create a multiboard with 1 columns and ItemRows[(Integer A)] rows, titled TrackString[(Integer A)]
          • Set ItemMultiboard[(Integer A)] = (Last created multiboard)
          • Multiboard - Set the text for ItemMultiboard[(Integer A)] item in column 1, row ItemTextRow[(Integer A)] to ItemSLOTtext[(Integer A)]
          • Multiboard - Hide ItemMultiboard[(Integer A)]
      • For each (Integer A) from 1 to 200, do (Actions)
        • Loop - Actions
          • For each (Integer B) from 1 to 20, do (Actions)
            • Loop - Actions
              • Multiboard - Set the display style for ItemMultiboard[(Integer A)] item in column 1, row (Integer B) to Show text and Hide icons
              • Multiboard - Set the width for ItemMultiboard[(Integer A)] item in column 1, row (Integer B) to 15.00% of the total screen width
  • Hit2
    • Events
    • Conditions
      • lol Equal to False
    • Actions
      • Set TempInt = 0
      • For each (Integer A) from 1 to 200, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TrackBoolean2[(Integer A)] Equal to True
            • Then - Actions
              • Set Point = (Point((Real(TrackX[(Integer A)])), (Real(TrackY[(Integer A)]))))
              • Destructible - Pick every destructible within 100.00 of Point and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Destructible-type of (Picked destructible)) Equal to ItemDestructibles[(Integer A)]
                      • (Destructible-type of (Picked destructible)) Not equal to Background
                    • Then - Actions
                      • Set TempInt = (TempInt + 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • TempInt Equal to 2
                        • Then - Actions
                          • Destructible - Pick every destructible within 100.00 of Point and do (Actions)
                            • Loop - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Destructible-type of (Picked destructible)) Equal to ItemDestructibles[(Integer A)]
                                  • (Destructible-type of (Picked destructible)) Not equal to Empty Slot
                                • Then - Actions
                                • Else - Actions
                        • Else - Actions
                    • Else - Actions
            • Else - Actions
              • Custom script: call RemoveLocation(udg_Point)
      • For each (Integer B) from 1 to 200, do (Actions)
        • Loop - Actions
          • Set TrackBoolean2[(Integer B)] = False
  • TrackMultiboard
    • Events
    • Conditions
      • lol Equal to False
    • Actions
      • For each (Integer B) from 1 to 200, do (Actions)
        • Loop - Actions
          • Multiboard - Hide ItemMultiboard[(Integer B)]
      • For each (Integer A) from 1 to 14, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TrackBoolean[(Integer A)] Equal to True
            • Then - Actions
              • Set Point = (Point((Real(TrackX[(Integer A)])), (Real(TrackY[(Integer A)]))))
              • Destructible - Pick every destructible within 100.00 of Point and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Destructible-type of (Picked destructible)) Equal to ItemDestructibles[(Integer A)]
                      • (Destructible-type of (Picked destructible)) Not equal to Background
                    • Then - Actions
                      • Set TempInt = (TempInt + 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • TempInt Equal to 2
                        • Then - Actions
                          • Destructible - Pick every destructible within 100.00 of Point and do (Actions)
                            • Loop - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Destructible-type of (Picked destructible)) Equal to ItemDestructibles[(Integer A)]
                                  • (Destructible-type of (Picked destructible)) Not equal to Empty Slot
                                • Then - Actions
                                  • Multiboard - Show ItemMultiboard[(Integer A)]
                                  • Multiboard - Maximize ItemMultiboard[(Integer A)]
                                • Else - Actions
                        • Else - Actions
                          • Multiboard - Show ItemMultiboard[(Integer A)]
                          • Multiboard - Maximize ItemMultiboard[(Integer A)]
                    • Else - Actions
              • Custom script: call RemoveLocation(udg_Point)
            • Else - Actions
      • For each (Integer B) from 1 to 14, do (Actions)
        • Loop - Actions
          • Set TrackBoolean[(Integer B)] = False
Now, i need a system to make my Searing sword (15) be placed in (1), but i cant find a way to do it, i need some check system.

All in one small sentence: I cant check the Searing sword destructible
 
Last edited:
Level 20
Joined
Jan 6, 2008
Messages
2,627
hmm, im kind of pissed since i spent so long time but just got negative results, is there some way of getting it quickly done, here is the map, if someone could be nice and fix it :grin:

YOU NEED JNGP

EDIT: Anachron told me to post it:

JASS:
function Trig_Ini_Actions takes nothing returns nothing
    globals
        trackable array Track[1]
    endglobals
    local trackable array Track
    //Weapon
    set Track[1] = CreateTrackable("empinv.mdx", 14520, 14723, 0) //14520 14723
    set udg_TrackX[1] = 14590
    set udg_TrackY[1] = 14723
    //Shield
    set Track[2] = CreateTrackable("empinv.mdx", 14590, 14723, 0) //14590 14723
    set udg_TrackX[2] = 14590
    set udg_TrackY[2] = 14723
    //Exit
    set Track[3] = CreateTrackable("empinv.mdx", 14385, 14648, 0) //14385 14648
    set udg_TrackX[3] = 14385
    set udg_TrackY[3] = 14648
    //Head
    set Track[4] = CreateTrackable("empinv.mdx", 14394, 15043, 0) //14394 15043
    set udg_TrackX[4] = 14394
    set udg_TrackY[4] = 15043
    //Shoulders
    set Track[5] = CreateTrackable("empinv.mdx", 14394, 14973, 0) //14394 14973
    set udg_TrackX[5] = 14394
    set udg_TrackY[5] = 14973
    //Necklace
    set Track[6] = CreateTrackable("empinv.mdx", 14394, 14905, 0) //14394 14905
    set udg_TrackX[6] = 14394
    set udg_TrackY[6] = 14905
    //Chest
    set Track[7] = CreateTrackable("empinv.mdx", 14394, 14841, 0) //14394 14841
    set udg_TrackX[7] = 14394
    set udg_TrackY[7] = 14841
    //Wrists
    set Track[8] = CreateTrackable("empinv.mdx", 14394, 14780, 0) //14394 14780
    set udg_TrackX[8] = 14394
    set udg_TrackY[8] = 14780
    //Gloves
    set Track[9] = CreateTrackable("empinv.mdx", 14720, 15043, 0) //14394 15043
    set udg_TrackX[9] = 14394
    set udg_TrackY[9] = 15043
    //Belt
    set Track[10] = CreateTrackable("empinv.mdx", 14720, 14973, 0) //14394 14973
    set udg_TrackX[10] = 14394
    set udg_TrackY[10] = 14973
    //Boots
    set Track[11] = CreateTrackable("empinv.mdx", 14720, 14905, 0) //14394 14905
    set udg_TrackX[11] = 14394
    set udg_TrackY[11] = 14905
    //Ring1
    set Track[12] = CreateTrackable("empinv.mdx", 14720, 14841, 0) //14394 14841
    set udg_TrackX[12] = 14394
    set udg_TrackY[12] = 14841
    //Ring2
    set Track[13] = CreateTrackable("empinv.mdx", 14720, 14780, 0) //14394 14780
    set udg_TrackX[13] = 14394
    set udg_TrackY[13] = 14780
    set bj_forLoopAIndex = 1
    set bj_forLoopAIndexEnd = 999
    loop
        exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
        call TriggerRegisterTrackableTrackEvent( gg_trg_Track, Track[GetForLoopIndexA()] )
        call TriggerRegisterTrackableHitEvent( gg_trg_Hit, Track[GetForLoopIndexA()] )
        set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
endfunction

//===========================================================================
function InitTrig_Ini takes nothing returns nothing
    set gg_trg_Ini = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Ini, function Trig_Ini_Actions )
endfunction
 

Attachments

  • backup8.w3x
    127.3 KB · Views: 43
Status
Not open for further replies.
Top