| 03-01-2004, 01:40 AM | #1 |
This is in JASS, I tried using Code:
call RemoveItem(MyItemVar) |
| 03-01-2004, 01:47 AM | #2 |
Um that command should remove the item completely. are you sure your not mistaking it for its verily simmilar cousin UnitRemoveItem(unit,item)? |
| 03-01-2004, 01:54 AM | #3 |
Positive. Is this one of those things that needs a small wait before it can be removed. Here is a sample of my code. Code:
set currentItems[1] = UnitItemInSlot(who,itemslot[1]) call UnitRemoveItem(who,currentItems[1]) call RemoveItem(GetLastRemovedItem()) It just lets the item sit there sparkling on the ground. |
| 03-01-2004, 01:59 AM | #4 |
Add a wait and see. I know in triggers you must have a small wait between losing and item and moving it, this may be the same concept. |
| 03-01-2004, 02:03 AM | #5 |
While on the concept of items, this little bit doesn't seem to be working either. Code:
call UnitAddItemById(who,'kysn') set fluffItems[x] = GetLastCreatedItem() It doesn't seem to be setting the fluffItems[x] = to anything. [edit]oh and BTW, the wait didn't help at all. |
| 03-02-2004, 12:56 AM | #6 |
Bleh, I know your problem its because you expect too much. Code:
set currentItems[1] = UnitItemInSlot(who,itemslot[1]) call UnitRemoveItem(who,currentItems[1]) call RemoveItem(GetLastRemovedItem()) Anyway heres a quick solution for you I don't know why your doing it so hard but here goes. Code:
call RemoveItem( UnitItemInSlot(who,itemslot[1]) ) Also for the same reason: Code:
call UnitAddItemById(who,'kysn') set fluffItems[x] = GetLastCreatedItem() Since jass like most programming language is actually somewhat intelligent all you have to do is combine these two steps into one. Code:
set fluffItems[x] = UnitAddItemById(who,'kysn') |
