Jump to content

Indestructible zombie help


Eric-Ihrno

Recommended Posts

Thanks to everyone who weighed in about my special irem script. Now I need help with a creature/terain script. I want to make a creature that can get back up again after dying (after a few turns delay). The initial idea was to make the creature script place a custom terrain (corpse) when the creature dies. The custom terrain would then run a script that waits for a few turns before erasing itself and using place_monster to bring back the creature. The problem is, my corpse script runs fine, but only on corpses I place in the editor. It won't work for ones created by a creature script. Is there any way to place a new terrain script while the game is running? I guess I could make the town or scenario script handle this, but it would be rather clumsy as I'd need a separate call in START_STATE for each resurrecting creature.

Link to comment
Share on other sites

Unfortunately, you can't place terrain scripts dynamically as far as I know. I haven't tried placing a terrain with an inherent, attached terrain script while the game was running, so I encourage you to try that.

 

How many monsters will have this self-resurrection ability? If the amount of monsters is less than 15, I think it would still be viable to put the script into the START_STATE of the town.

 

Generally, script efficiency is not a huge, noticeable problem when it runs in combat mode, or after an important event (at least you have a reason for the slowdown). Therefore, if you can just make the code run after a creature dies, then things would work out. This might have been what you were trying to do with your original idea.

 

If you activate and deactivate a certain terrain script that performs this resurrection function at the appropriate times, then everything should run pretty efficiently. By deactivate I mean change its script mode to 0 (only run every 8 turns when party is nearby). There could be multiple counters, variables, and SDFs for when, what, and where to resurrect the creatures. Since this might become complex if you have too many creatures, then you could have counterpart creatures with scripts that can keep running after the initial creature has died. Of course, you are using extra creature slots, but there are always limits.

 

Placing the corpses will be difficult graphically unless you make sure that the creatures won't wander off to other types of floors and terrain.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...