• 🏆 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!

Help with trigger

Status
Not open for further replies.
Level 8
Joined
Nov 9, 2011
Messages
326
Hey just quick question about 1 trigger.
Should i do it like this
  • Bush Picked up
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to DroppedItems_Branch
      • (Unit-type of (Triggering unit)) Equal to Survivor_Type
    • Actions
      • Set tempItem = (Item being manipulated)
      • For each (Integer tempInt) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Triggering unit)) Equal to Players[tempInt]
            • Then - Actions
              • Set Item_Branch[tempInt] = (Item_Branch[tempInt] + (Charges remaining in tempItem))
            • Else - Actions
      • Set tempItem = No item
      • Trigger - Run Update MB <gen> (ignoring conditions)
or should i have unit also saved into a variable because i have like 6 of alike triggers.
 
Level 8
Joined
Nov 9, 2011
Messages
326
Yeah guys sorry im trying to achieve an item pickup like when u pick up the item with 3 charges it adds it into a ''variable'' and updates multiboard (updateMB)
So for example i pick up some 3 planks adds it into a specific player variable and updates it on the multiboard so. MY question here is do i have to put a player into a variable also the triggering unit so i wont have leaks. To be more specific this line of code
  • (Owner of (Triggering unit)) Equal to Players[tempInt]
it has Owner of triggering unit (player) and triggering unit(unit) and neither of them arent put in variables for deindexing at the end of the code. (im hoping its called deindexing)

tell us what are you trying to achieve?
we can't tell what your trigger want to do hence we won't be able to help you with that

Where's the problem with that and, as Dark_Axl asked, what are you trying to achieve?

Could you add Update MB Too?
also Arad update mb isnt needed cuz it only updates multiboard numbers.
But just for you
  • Update MB
    • Events
    • Conditions
    • Actions
      • For each (Integer tempInt) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player(tempInt)) slot status) Equal to Is playing
              • ((Player(tempInt)) controller) Equal to User
            • Then - Actions
              • Multiboard - Set the text for Multiboards[tempInt] item in column 2, row 1 to Player_Names[tempInt]
              • -------- ==================================================== --------
              • Multiboard - Set the text for Multiboards[tempInt] item in column 2, row 3 to (String(Item_Branch[tempInt]))
              • -------- ==================================================== --------
              • Multiboard - Set the text for Multiboards[tempInt] item in column 2, row 4 to (String(Item_Coal[tempInt]))
              • -------- ==================================================== --------
              • Multiboard - Set the text for Multiboards[tempInt] item in column 2, row 5 to (String(Item_Eatable_Meat[tempInt]))
              • -------- ==================================================== --------
              • Multiboard - Set the text for Multiboards[tempInt] item in column 2, row 6 to (String(Item_Hay[tempInt]))
              • -------- ==================================================== --------
              • Multiboard - Set the text for Multiboards[tempInt] item in column 2, row 7 to (String(Item_Iron[tempInt]))
              • -------- ==================================================== --------
              • Multiboard - Set the text for Multiboards[tempInt] item in column 2, row 8 to (String(Item_Planks[tempInt]))
              • -------- ==================================================== --------
              • Multiboard - Set the text for Multiboards[tempInt] item in column 2, row 9 to (String(Item_Poisonous_Meat[tempInt]))
              • -------- ==================================================== --------
              • Multiboard - Set the text for Multiboards[tempInt] item in column 2, row 10 to (String(Item_Sticks[tempInt]))
              • -------- ==================================================== --------
              • Multiboard - Set the text for Multiboards[tempInt] item in column 2, row 11 to (String(Item_Water[tempInt]))
              • -------- ==================================================== --------
              • Multiboard - Set the text for Multiboards[tempInt] item in column 2, row 12 to (String(Item_Wool[tempInt]))
              • -------- ==================================================== --------
              • Multiboard - Set the text for Multiboards[tempInt] item in column 2, row 14 to (String(Stats_Starvation[tempInt]))
              • -------- ==================================================== --------
              • Multiboard - Set the text for Multiboards[tempInt] item in column 2, row 15 to (String(Stats_Thirst[tempInt]))
              • -------- ==================================================== --------
              • Multiboard - Set the text for Multiboards[tempInt] item in column 2, row 16 to (String(Stats_Warmth[tempInt]))
              • -------- ==================================================== --------
              • Multiboard - Set the text for Multiboards[tempInt] item in column 2, row 17 to (String(Stats_Time_Alive[tempInt]))
            • Else - Actions
      • Set tempInt = 0
 
Status
Not open for further replies.
Top