As with BioWare's "Zombie Corpse" placeable, this will allow you to have dead bodies suddenly animate into zombies when adventurers get close enough. However, this package does not rely on an expensive heartbeat, so it requires less CPU time. (I'm guessing much less, but I haven't clocked it.)
Getting started is simple. Download, unzip, and import into your module. Then wherever you want a corpse to appear, place a zombie, and make sure the heartbeat script for that zombie is tk_zomb_hb. The script will take care of replacing the zombie with a corpse placeable, and the corpse will re-animate to the zombie when enemies approach.
Once you have the basics, some advanced features can be accessed via local variables on the original creature. (See the comments in the script tk_zomb_inc for details.) These include the ability to specify which placeable to use as the corpse, and which zombie to re-animate as. Plus, if you don't like the placeables, you can simply have the original creature fall over dead until enemies approach. There's also an option to have the zombie corpses respawn after the death of the zombie (which might be useful on persistent worlds).
New 11/3: The detection range can now be set to 2.5, 5, or 10 meters. (Previously, it was always 5.)
While I was doing this, I figured I would also improve the look of the re-animated zombies. Instead of *poof* appearing, they actually get up from where the corpse was lying.
By the way, there is nothing about zombies hardcoded into this system (other than the default placeable's appearance). You can use it to make any creature rise from any placeable or dead creature when enemies get close.
This is my thirteenth Vault submission, it involves zombies, and it was published on Halloween 2007. Creepy enough for you? :)
Did you have the zombie lie dead, or was it replaced by a placeable? Do you have any local variables set on the zombie (also any set on the placeable, if you are using one)? There is not much that can interfere with the respawn; the two possibilities I found would result from a local variable filled with a bad value. (Well, I guess there is a third possibility -- placing a zombie then deleting its blueprint would mess with the system, but that's getting into actively messing with things, and you sound like you stumbled upon a hole somewhere.)
As for making a demo module, it would not be too complicated. However, no one has yet asked politely for a demo module, so I have not made one.
Sorry, but this script does not work as said, For one placing a zombie on the ground and coming up to it despawns it and spawn nothing in its place. Secondly dude. How about making a demo mod so we can see this working the way you say itís supposed to? I guess thatís to complicated? _________________________ Dark
Eye of the Beholder
Posted by Bard Simpson at 2010-05-04 16:07:21 Voted 10.00 on 05/04/10
This is great -- it works as claimed and allows for options. With efficiency and flexibility, what more could one want? Thanks, Krit!
Nice. Looks a lot smooter than Bioware's "random zombie teleporting in on top of corpse". _________________________ I'm a NWN1 Builder and a NWN2 DM for Jewel of Calimshan PW, who are just out of beta. Link
This might not be perfect for implementing a sleeping creature since the downed creature will register as "dead" (when a player holds down ). If you're willing to do a bit of scripting on your own, you might be able to do something better -- just look at the function TK_CreateDetector() in the script tk_detector_inc. (I say "you" because waiting for me to come up with something might take a while.)
On the other hand, aside from that one detail, I like the idea, and you should be able to do something like wake a group of sleeping bears. The script to edit is tk_zomb_rise. I don't see a simple and clean way to do it, though. (The basic problem is finding the other bears who need to be awakened. If you can handle that, getting them to wake up is fairly simple.)
Which approach do you prefer? How much of the work can you do / have you done?
Posted by ghowriter at 2007-11-03 21:10:15 Voted 10.00 on 11/03/07
Perfect! This will work on something I have been trying to get working... since it isn't tied to zombies, I can put it on a bear (or group) and if the PC get's too close, it wakes (and is very angry!) any way to set this up to do a shout to any other's in the area... a group of sleeping bears... then if the pc wakes one, it wakes the others... i know, i know... too mean!