HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Item Removed On Drop...

11-08-2007, 04:53 PM#1
MaD[Lion]
well it seems like if an item can be dropped on death, and the unit dies in a place tat is not pathable. then the item is removed after it drops. anyone know how to fix this...?
11-08-2007, 05:10 PM#2
HINDYhat
Try to do it with triggers?
11-08-2007, 05:16 PM#3
cohadar
Quote:
Originally Posted by HINDYhat
Try to do it with triggers?



How about you try to move dying unit to pathable terrain just before it dies?
11-08-2007, 05:34 PM#4
Rao Dao Zao
I think I may be experiencing a similar issue; but I've had it happen anywhere, not just death on non-pathable areas (unless by non-pathable, you mean "unbuildable").
11-09-2007, 12:52 AM#5
MaD[Lion]
its a stupid bug, the item isnt removed, it just die... I fixed it by using a 0 timer to check if it is alive or not
11-09-2007, 03:22 AM#6
DioD
just make terrain pathchable on unit death.

there is native for this.

after some time undo changes

single cell (32\32) will be enouth
11-09-2007, 12:22 PM#7
MaD[Lion]
recreating it is alot better ^^
11-09-2007, 01:13 PM#8
CommanderZ
Sometimes recreating is not viable - for exapmple if you have some GC values/structs attached to it. I got another idea:

Event: Unit's life becomes less than 0.01 HP (I don't think the event "Unit dies" works here)
Actions: Move the item to location (Location of unit(Triggering Unit))

AFAIK the SetItemLoc(?) moves the item to the closest pathable point. You may need to makte the unit drop the item first. The "Unit's life becomes less than 0.01 HP" should happen before the unit dies, so it all should be possible.
11-09-2007, 09:31 PM#9
HINDYhat
Don't units die at 0.405 HP, and then their HP is set to 0? In that case, using TriggerRegisterUnitStateEvent, you could make this work.

Unless it works already with a timer callback function. "If it ain't broken, don't fix it"
11-10-2007, 05:56 AM#10
Pyrogasm
Yes, Silvenon, a unit that has 0.405 life or less is "dead" whilst one with 0.406 or greater is "alive".
11-11-2007, 04:15 PM#11
MaD[Lion]
i just use 0, tat works ^^