| 12-13-2009, 03:29 PM | #1 |
I don't know if this has been asked before but I've searched and I haven't able to find the answer looking for. I'm trying to create an item that does not disappear when it is used upon acquisition. Its based off a tome. Although I've set the item to be non perishable, it still keeps disappearing. . The workaround I've thought of is to let the item perish, then spawn a copy of it on the ground. I would then need to set the Items 'powerup' property to 0. Unfortunately the GUI does not seem to be able to do this. . =( Once this has been done I can give the item to the hero and it shouldn't disappear. Is there a custom script or any other efficient method I can use to get this effect? Because i intend to have over 100 different items in the map i'm working on, I don't think making 100 duplicates with just one value changed is a good fix. Any help is greatly appreciated. Thanks in advance. |
| 12-13-2009, 03:34 PM | #2 |
Give it more than one charge, or yes, make it non-perishable. You don't need to make any duplicates. If that fails, try basing it on something other than a tome, setting it to be used automatically on pickup, and not be perishable. Also, moved to general development, this really isn't a T&S question. |
| 12-13-2009, 03:54 PM | #3 |
Whoops.. sorry about the incorrect section. Heres what I've tried. 2 Charges Non-Perishable Used when acquired. Result: Item still disappears. -____________- Oh, and i forgot to mention. I'm basing it off tomes/consumables because i need the item to be purchasable from a shop with a full inventory.. As a reference, heres the trigger im using. Trigger: Replace items Copy
![]() Conditions
|
| 12-13-2009, 04:22 PM | #4 |
just make it is not usable on pickup |
| 12-13-2009, 04:29 PM | #5 | |
Quote:
Ive tried that, it works. But only if the inventory is not full. As you may have noticed in the trigger, In the case of a full inventory, I need to drop the item 'Weapon slot' to make space for the item being purchased. This is a lot more complicated than it looks. It just makes no sense as to why the item disappears when its non-perishable in the first place.. |
| 12-13-2009, 05:45 PM | #6 |
The easiest (and most awful looking) is to force the player to keep one slot empty. By having a trigger like if unit acquires item, manipulating item in slot 6, drop manipulating item. That way when they acquire an item in slot 6 you can then trigger what you want to do like swap the weapon slot or whatever. |
| 12-14-2009, 07:28 AM | #8 | |
Quote:
set number of slots in the "inventory-ability" (cant remember id) to 7 and force the player to leave the invisible slot empty |
| 12-14-2009, 09:20 AM | #9 | |
Quote:
Just checked, its 'AInv'. GUI doesn't allow me to set 7 slots. Any idea how it can be set with a Custom trigger / JASS? |
| 12-14-2009, 09:31 AM | #10 |
Shit + Enter on a field allows you to do any value. |
| 12-14-2009, 11:11 AM | #11 | |
Quote:
Very cool +Rep. Thanks! Hmm.. im getting the inventory is full message when i try to pick up the 7th item =/ |
| 12-14-2009, 12:50 PM | #12 |
ah...sry. made a mistake, use 2 times 'Alnv' (one with 6 slots and one with one slot) now make the one slot inv always empty (dunno if the order of the 2 abils is important) |
| 12-15-2009, 01:28 AM | #13 | |
Quote:
Hmm.. I read about this method somewhere, but the poster mentioned there was a side effect of all the items disappearing but the hero still benefiting from the bonuses. Say i add 2x AInv, what condition would i use to check the 7th invisible slot? if inventory slot 7 has item = true? (sorry this is a little made up) edit: heres the link. Hidden Inventory Bug |
| 12-15-2009, 01:54 AM | #14 |
It seems that the invisible slot is used first. This is actually very interesting. Although I'm not sure how easy to script around it would be. I totally might use ItemMenu around this trick. Its completely worthless :( You can't move the item to a real slot. nor can you do the drop item or whatever. You can remove the item, but then you lose things like attached data. |
| 12-15-2009, 05:16 AM | #15 |
Hmm... If the invisible slot is always used first, and the item cannot be removed by the player from that particular slot, you could - for your RPG system - fill it with a placeholder right from the start, and then replace it later on - via triggers or somesuch - with some "inherent" item. Like biological upgrades which function as items, but should not be droppable. Or a cursed/blessed item that bonds with the hero and cannot be removed unless the hero does some specific task which removes the item via triggers and replaces it with a dummy placeholder again. I think it has potential... |
