KillMobile() with NO_CORPSE argument
-
innominabile
- Adept Poster
- Posts: 85
- Joined: Wed Aug 30, 2006 5:24 pm
KillMobile() with NO_CORPSE argument
I know it possibile to kill and after destroy corpse, but it could be more linear and fast to kill someone and not left corpse....
-
innominabile
- Adept Poster
- Posts: 85
- Joined: Wed Aug 30, 2006 5:24 pm
mmm yes....
and it could be also usefull define graphic of corpse created
with default value of actual corpse graphic, and graphic zero for no corpse.
Anymore I contiue to think that is importat do not link the dead with life points....
I cound decide to not want someone die when life points reach zero value.
and it could be also usefull define graphic of corpse created
with default value of actual corpse graphic, and graphic zero for no corpse.
Anymore I contiue to think that is importat do not link the dead with life points....
I cound decide to not want someone die when life points reach zero value.
-
Marilla
I guess the only thing I could really imagine to actually implement the changes people want would be the following:
First, implement a core mobile.kill() function. Perhaps the function could include parameters to choose what kind, and whether, to produce a corpse. Such a function could also replace the chrdeath and death scripts.
Next, implement a VitalChanged hook, which can be used to implement the standard death when hit points reach 0. The VitalChanged hook should receive the Vital being changed, the old value before the change, and the new value after the change. Or some other similar set of info so the script would know what changed, in what direction, and by how much.
This way, people could implement death as it currently works in the core. Hopefully, the VitalChanged hook would be implemented with very lean scripting, as it would be somewhat often that it would be triggerred. This would allow completely custom implementations of death, while making it very easy to maintain the current death mechanism (simply write a VitalChanged hook that checks for hit points being 0 or lower).
I don't know if I would use such a thing myself, but it does seem like there's enough interest in it. I think I might use such a system to override the creation of corpses for monsters' deaths in cases where one isn't needed, and also it would invite other ideas related to death.
First, implement a core mobile.kill() function. Perhaps the function could include parameters to choose what kind, and whether, to produce a corpse. Such a function could also replace the chrdeath and death scripts.
Next, implement a VitalChanged hook, which can be used to implement the standard death when hit points reach 0. The VitalChanged hook should receive the Vital being changed, the old value before the change, and the new value after the change. Or some other similar set of info so the script would know what changed, in what direction, and by how much.
This way, people could implement death as it currently works in the core. Hopefully, the VitalChanged hook would be implemented with very lean scripting, as it would be somewhat often that it would be triggerred. This would allow completely custom implementations of death, while making it very easy to maintain the current death mechanism (simply write a VitalChanged hook that checks for hit points being 0 or lower).
I don't know if I would use such a thing myself, but it does seem like there's enough interest in it. I think I might use such a system to override the creation of corpses for monsters' deaths in cases where one isn't needed, and also it would invite other ideas related to death.