NPC to Statue
Ceyarrecks
Member Posts: 45
Excuse me Please:
I am not sure if this question ought go here or in the Builders section, but,
I am having a subtle issue with onspawn/onconv make petrified.
while using the examples provided by
Custom NPC/Monster Statues
does indeed make the NPC encased in stone,... it also causes them to look ... weird, unnatural.
especially if scene expects the discovered petrified creatures walked upon a Medusa unawares or were engaged with the Medusa in combat; or consider Library scene in XP2_Chapter2, how cool would it be to have an NPC petrified while "reading."
Currently, the NPCs look like they were dipped in freezing cold water first, then turned to stone.
What can be done to adjust the a fore mentioned scripting (or something else) to make them look more natural?
on a related, but not super critical note, how can said "statue" then be made untargetable/unattackable?
Thank you for the assistance in trying to understand this,...
Cey.
I am not sure if this question ought go here or in the Builders section, but,
I am having a subtle issue with onspawn/onconv make petrified.
while using the examples provided by
Custom NPC/Monster Statues
does indeed make the NPC encased in stone,... it also causes them to look ... weird, unnatural.
especially if scene expects the discovered petrified creatures walked upon a Medusa unawares or were engaged with the Medusa in combat; or consider Library scene in XP2_Chapter2, how cool would it be to have an NPC petrified while "reading."
Currently, the NPCs look like they were dipped in freezing cold water first, then turned to stone.
What can be done to adjust the a fore mentioned scripting (or something else) to make them look more natural?
on a related, but not super critical note, how can said "statue" then be made untargetable/unattackable?
Thank you for the assistance in trying to understand this,...
Cey.
0
Comments
If you want the statues to be frozen in action poses, check out the technique here:
https://neverwintervault.org/project/nwn1/hakpak/original-hakpak/frozen-animations-emotes
I don't think you can make a creature untargetable. I thought Beamdog had changed this, but I can't find it in the patch notes...
You have to ensure that all factions regard it as neutral (either adjust reputation, or put it in a special faction) to prevent it being attacked. Set the plot flag after petrifaction to make it immune and indifferent to any kind of attack. The OnConversation script needs to suppress turning. Hopefully, the example you quoted does all that?
Owing to a bug, when a save is loaded, check that all statues are still petrified - reapply the effect if not.
is what the above scripted petrification results in. not even the default "just standing there" posture.
[another oddity I just noticed, their weapons, nor shield, are turned to stone]
(I have a sneaking suspicion what I am asking for is WAAY over my head)
But, is there other means to have a more natural stance; Preferably in mid-stroke of attack as makes sense in Shaori's Fell: Library, or at least something more natural, as though they were "living" prior to petrification?
In theory, you could use the frozen animation method to freeze combat. For example, have an NPC attack an invisible object, then freeze them in a pose you like. A script that freezes the NPC for a while every 0.1 seconds or whatever can be used to select the final pose. Requires a lot of time and patience, though.
You don't want players to see the animation, of course. If the creature spawns long before players see it, setting their AI level to Normal before animating achieves that. Otherwise, black screen or invisibility can be used to cover up.
I kinda understand what you are saying, but am completely clueless on how to actually implement said process.
so far my understanding is to accomplish one action, copy/paste x script there, y script here, done.
(as in the case of my above mentioned petrification)
considering, at least in the case of the Library, that the PC enters but is delayed in hallway by dialog, so seeing said invisible action should not occur.
my programming experience stopped a very long time ago with Q-Basic; so I fear the learning curve to become as wise as yourself with said scripting leads me to think years of continuous guided training would be required.
which still leaves me with said, albeit cosmetic, process wanting.
would I be out of place to ask for a detailed, step-by-step process of what would need to be accomplished for said NPC to attack invis object, freeze in that position, then be petrified?
(that sounds sooo simple stated that way, huh?)
Start with one of the frozen animation scripts - say ew_ani_armsup, for example - as a template.
The line
needs to read something like
where ##### is the tag of the invisible object.
The next line reads
The 0.5 is the delay that you need to play around with until you get a pose you like.
When that's OK, after that line, add the lines you already have to create the petrify effect, using a slightly longer delay to ensure that petrifaction occurs after freezing.
Does that help?
I am assured for those whom are better versed or not as hampered as I, your suggestions would be most illuminary; alas, I do not even know where to grasp hold of the above to even frame a question.
1. Put the creature where you want it to be, and give it a unique tag.
2. Put an invisible object in front of it, and give a unique tag. Make sure to uncheck the "Static" field.
3. Paint a generic trigger somewhere away from them, where it will take a couple of seconds for the player to go from it to the creature's location, and give it a unique tag as well.
4. Go to the trigger's event scripts, and create a new OnEnter script. For this script, put:
void main()
{
object oPC=GetEnteringObject();
object oTarget=GetObjectByTag("MY_TARGET_TAG");
object oCreature=GetObjectByTag("MY_CREATURE_TAG");
if (GetIsPC(oPC)&&GetLocalInt(OBJECT_SELF,"DO_ONCE")!=TRUE)
{
SetLocalInt(OBJECT_SELF,"DO_ONCE",TRUE);
AssignCommand(oCreature,ActionAttack(oTarget));
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectPetrify(),oCreature));
}
}
5. Replace MY_TARGET_TAG and MY_CREATURE_TAG with the tags you assigned to your objects.
6. Save everything and test it out.
This is a no-frills implementation, that just accomplishes the basic task. The creature will remain targetable, and can be attacked and killed, and the effect can be dispelled. Weapons will not display the effect. If you want any other features, this can all be modified and extended without too much trouble.