# Wierd attachment Problem

Status
Not open for further replies.

#### Slaydon

Level 20
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

• 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

#### Pharaoh_

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

#### Slaydon

Level 20
found the scource, and i know i scripted it bad, i will rewrite it sooner or later, the problem was it was left,hand right,hand not opposit XP +rep anyways

Status
Not open for further replies.

Replies
6
Views
980
Replies
1
Views
446
Replies
9
Views
657
Replies
0
Views
422
[Spell] Problem !!
Replies
2
Views
631