Page 1 of 1
counting deaths
Posted: Wed Jun 22, 2005 5:57 am
by apandapion
I'd like to count creature deaths from encounters without modifying the creature themselves. Is there a good way to do this?
Posted: Wed Jun 22, 2005 10:48 pm
by fremen
Whenever a creature dies it speaks a silent string that you should be able to use GetListenPatternNumber(); function to retrieve. I'm not sure if this will work for what you want though, because as far as I know it would require an invisable creature and you can't determine the specific creature that died.
I believe the pattern number is 3, but you should check that yourself.
I'm also not positive on the range of this, I think one is ...SILENT_TALK and the other is ...SILENT_SHOUT. Either way the ListenPattern with the highest matching number is the only one that GetListenPatternNumber() will return.
Re: counting deaths
Posted: Wed Jun 22, 2005 10:52 pm
by Aloro
apandapion wrote:I'd like to count creature deaths from encounters without modifying the creature themselves. Is there a good way to do this?
Not that I know of. We typically use the OnDeath event handler (note that UDE OnDeath events don't fire all the time, so you should not replace OnDeath handlers with UDEs).
- Aloro
Posted: Wed Jun 22, 2005 11:19 pm
by Psyco
For what purpose?
If it is not actually going to be used ingame but instead is just going to be used for informational purposes to see what areas are being frequented then you can just parse the log file.
No need to modify any scripts IG.
If you actually plan on dynamically using that info IG, then the log file method is out unless you automate it and store the parse info in a database which is referenced in your ingame scripts.
Thats the only method I can think of that will involve no editing of current creatures or current scripts. I am not saying however that this is the best method.
Posted: Wed Jun 22, 2005 11:27 pm
by apandapion
Psyco wrote:For what purpose?
I want to use the number of recent deaths of certain types of creatures to determine a global behavior.
Posted: Sat Jul 02, 2005 6:27 pm
by masterofchains
hey, I am working on a mini-game type deal, just a joke game, but this would come in handy with it. if anyone figures it out, let me know too, please.
oh...and only a hint on the mini-game..lots of penquins..
