(solved) How gets the gargoyle back into statue?


I’m a bit dazzled.

I guess, everybody knows the monsterstatue which turns into an gargoyle, if the PC is near. This is done with an on_heartbeat script “nw_o2_gargoyle”. (Gives the ressource-ref in uppercase, huh??)

If nothing happens to the creature, it will turn back into a statue after a while (say 2 or three heartbeats). I thought, this should be done via heartbeat as well. And yes, there is a specific heartbeat on the creature: “nw_c2_gargoyle”.

I looked into the script “nw_c2_gargoyle” and the script-header confirms the assumtion. But the code??? I would use this code to get the monster out of the statue, not into it! There seems to be no code to get the gargoyle back into the statue.

In the game, the statue/gargoyle works as exspected but I dont know why. How is this possible?

The game executes compiled scripts which do not have to match script source you see in the toolset. This is such case - a mix-up in the bifs.


nw_c2_gargoyle.nss script source bundled with both expansion packs which you see in the toolset (the one with nonsense code you mentioned) was not used to compile the bundled script binary with matching name. Instead, this nw_c2_gargoyle.ncs comes from OC [see note]. That script, actually executed by the game, correctly replaces creature with placeable.

If you use nwnexplorer to search for nw_c2_gargoyle, you’ll find that OC script’s source.


These compiled scripts are not binary-equal, but their analysis suggests they execute the same instructions.


Thanks. That explains it.