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

Wierd attachment Problem

Status
Not open for further replies.
Level 20
Joined
Jan 6, 2008
Messages
2,627
Hi as you all know ive been making a inventory for my map, ive managed to do it great so far, but ive reached a problem, the special effect creates at the unit, but only right hand, and when i drop / move it to bag it should delete, but it wont :eekani:

  • For each (Integer A) from Lagless to Lagless, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SelectedDest Not equal to No destructible
          • TrackBoolean2[DropInt] Not equal to True
          • TrackBoolean2[(Integer A)] Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EmptySlot[(Integer A)] Equal to True
            • Then - Actions
              • For each (Integer B) from 66 to 200, do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Destructible-type of SelectedDest) Equal to ItemDestructibles[(Integer B)]
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Integer A) Greater than 14
                          • (Integer A) Less than or equal to 62
                          • EmptySlot[(Integer A)] Equal to True
                        • Then - Actions
                          • Set EmptySlot[DropInt] = True
                          • Set TempDestType = (Destructible-type of SelectedDest)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • DropInt Equal to 1
                              • TwoHandUsed Equal to True
                              • SelectedDest Equal to TwoHandDest
                            • Then - Actions
                              • Set EmptySlot[2] = True
                              • Set TwoHandUsed = False
                            • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • DropInt Equal to 1
                            • Then - Actions
                              • Special Effect - Destroy ItemAttachment[DropInt]
                            • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • DropInt Equal to 2
                            • Then - Actions
                              • Special Effect - Destroy ItemAttachment[DropInt]
                            • Else - Actions
                          • Destructible - Remove SelectedDest
                          • Set Point = (Position of SlotDests[(Integer A)])
                          • Destructible - Create a TempDestType at Point facing 180.00 with scale 0.78 and variation 1
                          • Set EmptySlot[(Integer A)] = False
                          • Custom script: call RemoveLocation(udg_Point)
                          • Trigger - Run DoodadFxRemove <gen> (ignoring conditions)
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Or - Any (Conditions) are true
                            • Conditions
                              • And - All (Conditions) are true
                                • Conditions
                                  • (Integer A) Equal to 1
                                  • EmptySlot[(Integer A)] Equal to True
                                  • ItemSlot[(Integer B)] Equal to (Integer A)
                              • And - All (Conditions) are true
                                • Conditions
                                  • ItemSlot[(Integer B)] Equal to 1
                                  • (Integer A) Equal to 2
                                  • ItemOneHand[(Integer B)] Equal to True
                        • Then - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • ItemTwoHand[(Integer B)] Equal to True
                              • ItemSlot[(Integer B)] Equal to 1
                              • EmptySlot[2] Equal to True
                              • EmptySlot[2] Not equal to False
                              • (Integer A) Equal to 1
                            • Then - Actions
                              • Special Effect - Create a special effect attached to the hand,left of Unit using ItemAttachmentString[(Integer B)]
                              • Set ItemAttachment[1] = (Last created special effect)
                              • Set EmptySlot[DropInt] = True
                              • Set TempDestType = (Destructible-type of SelectedDest)
                              • Destructible - Remove SelectedDest
                              • Set Point = (Position of SlotDests[(Integer A)])
                              • Destructible - Create a TempDestType at Point facing 180.00 with scale 0.78 and variation 1
                              • Set EmptySlot[(Integer A)] = False
                              • Custom script: call RemoveLocation(udg_Point)
                              • Trigger - Run DoodadFxRemove <gen> (ignoring conditions)
                              • Set TwoHandUsed = True
                              • Set EmptySlot[2] = False
                              • Set TwoHandDest = (Last created destructible)
                            • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • ItemOneHand[(Integer B)] Equal to True
                              • EmptySlot[2] Equal to True
                              • ItemTwoHand[(Integer B)] Equal to False
                            • Then - Actions
                              • Special Effect - Create a special effect attached to the hand,right of Unit using ItemAttachmentString[(Integer B)]
                              • Set ItemAttachment[2] = (Last created special effect)
                              • Set EmptySlot[DropInt] = True
                              • Set TempDestType = (Destructible-type of SelectedDest)
                              • Destructible - Remove SelectedDest
                              • Set Point = (Position of SlotDests[(Integer A)])
                              • Destructible - Create a TempDestType at Point facing 180.00 with scale 0.78 and variation 1
                              • Set EmptySlot[(Integer A)] = False
                              • Custom script: call RemoveLocation(udg_Point)
                              • Trigger - Run DoodadFxRemove <gen> (ignoring conditions)
                            • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • ItemOneHand[(Integer B)] Equal to True
                              • EmptySlot[1] Equal to True
                              • (Integer A) Equal to 1
                              • ItemTwoHand[(Integer B)] Equal to False
                            • Then - Actions
                              • Special Effect - Create a special effect attached to the hand,left of Unit using ItemAttachmentString[(Integer B)]
                              • Set ItemAttachment[1] = (Last created special effect)
                              • Set EmptySlot[DropInt] = True
                              • Set TempDestType = (Destructible-type of SelectedDest)
                              • Destructible - Remove SelectedDest
                              • Set Point = (Position of SlotDests[(Integer A)])
                              • Destructible - Create a TempDestType at Point facing 180.00 with scale 0.78 and variation 1
                              • Set EmptySlot[(Integer A)] = False
                              • Custom script: call RemoveLocation(udg_Point)
                              • Trigger - Run DoodadFxRemove <gen> (ignoring conditions)
                            • Else - Actions
                        • Else - Actions
                        • Else - Actions
                    • Else - Actions
            • Else - Actions
        • Else - Actions
 
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ItemTwoHand[(Integer B)] Equal to True
      • ItemSlot[(Integer B)] Equal to 1
      • EmptySlot[2] Equal to True
      • EmptySlot[2] Not equal to False
      • (Integer A) Equal to 1
    • Then - Actions
      • Special Effect - Create a special effect attached to the hand,left of Unit using ItemAttachmentString[(Integer B)]
You have "EmptySlot[2] Equal to True" and then again "EmptySlot[2] Not Equal to False", which is the same.
  • For each (Integer A) from Lagless to Lagless, do (Actions)
Did you mean "from Lagless to (Lagless + 1)" here? Cause it makes no sense the way it is, it's like doing For each (Integer A) from 1 to 1, do (Actions)
That's why IntegerA is always 1 and not 2, because the limits of the loop are the same number.
 
Status
Not open for further replies.
Top