| 07-29-2008, 07:44 PM | #1 |
I need to know if a dead unit is still a corpse or already a skeleton. I know one solution, using a dummy unit with a dummy undead ability (a skeleton target). And use the native JASS:IssueTargetOrderById takes unit whichUnit, integer order, widget targetWidget returns boolean A better way ? Can we do some actions with a corpse that we can't with a skeleton (unit paused or not), or the opposite ofc. |
| 07-29-2008, 08:33 PM | #2 |
all units turn to skeletons after some fixed (game play constants) time. detect this time via your current method and then use timers unit death = flag flesh after some time = flag bone after some time = clean up. |
| 07-30-2008, 07:40 AM | #3 |
I already thought about that, but if i suspend the decay then this method fails. I search something more accurate and safer. For example if we could add an ability to a corpse decay unit and not for a skeleton. But we can add one for the twice. I search something like that. Because if i use a dummy unit maybe i will must manage and recycle some. I don't mean that's over complicated, but if i don't need it why i would do that ? Btw i didn't test, and maybe only one unit is enough, but anyway it's still over skill. |
| 07-30-2008, 08:29 AM | #4 |
and if someone eat the corpse =O ? or you don't have such ability in your map ? (or summon a skeleton) |
| 07-30-2008, 08:31 AM | #5 | |
Quote:
And you forget the revive spell |
| 07-30-2008, 08:26 PM | #6 |
maybe: unit is alive -> EVENT_UNIT_DEATH -> corpseDecayTime -> EVENT_UNIT_DECAY -> boneDecayTime |
| 07-31-2008, 01:52 PM | #7 | |
Quote:
So it will leak if i must add this event when an unit enter the map. Btw it seems the corpseDecayTime depends the model (time of the animation death). I tried to change the animation speed without any effect. And when you change the constants this time don't change. But it affects the time for a completely decay = time of animation death + time of corpseDecayTime + time of boneDecayTime. |
