- Joined
- Oct 19, 2010
- Messages
- 71
Hi. Thank you very much for reading this.
I've been having trouble with the equipment system for my map. I'm using a spellbook as the equipment screen. When the player clicks on a piece of equipment it removes the item from inventory and adds an ability to "remove the item" to the spellbook. Unfortunately, for some reason the abilities are getting mixed up somehow. So far I've only made 2 separate items (gloves and helms) and after they're both equipped, clicking on the spellbook ability to remove the item does remove it. However, after you equip it again, no matter which item you try to remove, it removes the other item (the one that wasn't removed first) and it goes back and forth each time you repeat that. I'm very sure it has to do with the spellbook abilities, but I haven't been able to fix it. It may not be necessary to view this trigger to answer the question, but here is the one to remove hand items. There is another one for head items.
I've been having trouble with the equipment system for my map. I'm using a spellbook as the equipment screen. When the player clicks on a piece of equipment it removes the item from inventory and adds an ability to "remove the item" to the spellbook. Unfortunately, for some reason the abilities are getting mixed up somehow. So far I've only made 2 separate items (gloves and helms) and after they're both equipped, clicking on the spellbook ability to remove the item does remove it. However, after you equip it again, no matter which item you try to remove, it removes the other item (the one that wasn't removed first) and it goes back and forth each time you repeat that. I'm very sure it has to do with the spellbook abilities, but I haven't been able to fix it. It may not be necessary to view this trigger to answer the question, but here is the one to remove hand items. There is another one for head items.
-
Remove Hands
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Ability being cast) Equal to Remove Leather Gloves
-
(Ability being cast) Equal to Remove Gauntlets
-
-
-
-
Actions
-
Set tempPoint = (Position of (Triggering unit))
-
Item - Create hands at tempPoint
-
Custom script: call RemoveLocation(udg_tempPoint)
-
Unit - Order (Triggering unit) to Right-Click (Last created item)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Ability being cast) Equal to Remove Leather Gloves
-
hands Equal to Leather Gloves
-
-
-
-
Then - Actions
-
Unit - Remove Equip Leather Gloves from (Triggering unit)
-
Unit - Remove Item Armor Bonus (+1) from (Triggering unit)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Ability being cast) Equal to Remove Gauntlets
-
hands Equal to Gauntlets
-
-
-
-
Then - Actions
-
Unit - Remove Equip Gauntlets from (Triggering unit)
-
Unit - Remove Item Armor Bonus (+4) from (Triggering unit)
-
-
Else - Actions
-
-
Set hands = (Item-type of No item)
-
-