HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Droping Items

08-20-2003, 07:37 AM#1
Neo_Genesis
It sounds simple at first glance and it should be, but apperantly it isnt.

I am at the point of pulling my hair out on this so hopfuly some one can figure this out.

Here is the problem in a nut shell.
I have an item (that is actualy 20 diffrent items) each time you aquire one of the items it counts up by one. So example say you have one of the items at level 1, you aquire another item (ether by trigger or picking it up) and instead of haveing 2 items in your invo you have 1 but it is now replaced by a level 2 item (much like orb of shadows in the campain). This I seem to have no problems with what so ever. Items add perfictly

Now here is the problem. I want the item to be dropable in increments of 1. i.e. say you have 5 in your invo and you drop it instead of droping 5 you drop 1 and have 4 left. However when I do this the item dosent decrease but vanishes completly and the stats it gives remain!

I am using the "Unit - A unit loses an item" as the event and in simi suedo code
Remove item being manipulated (thats the one on the map)
Create level 1 item at postion of hero mainpulating item (also on the map)
Var_Players_Item_Level = Var_Players_Item_Level - 1
Hero - Create Item Var_Item_Type_Array[Var_Players_Item_Level] for hero mainpulating item

Now I have almost the exact same code running in another part of my map and it doesnt seem to have any problem. So I have boiled it down to the event that is the problem.

So (at long last) here is my question. Is there a better way to detect heros droping items, like orders or item enters region or somthing like that. Or a better way to code this. As it is useless if the item vanishes and stats remain.

Thanks for any help anyone can give

Neo_Genesis