Building statues

While I was working on this project of mine, suddenly I came across The Hand tavern, in Myratma.

If someone needs some background about it…

image

So, I build this onSpawn function for a creature (just needs a couple of variables preset to work on)

#include "nw_i0_generic"
#include "x0_i0_anims"
#include "x0_i0_treasure"
#include "q_inc_switches"

void DoStatue (object oStatue)
{
    effect ePetrify = EffectPetrify();
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePetrify, oStatue);
}

void main()
{
    object oTarget = OBJECT_SELF;
    string oTargetName = GetLocalString (oTarget, "statue_name");
    float  oTargetSize = GetLocalFloat  (oTarget, "statue_size");
    string sTargetPose = GetLocalString (oTarget, "statue_pose");
    int    iTargetPose = ANIMATION_LOOPING_PAUSE;
    if (sTargetPose == "bow")      { iTargetPose = ANIMATION_FIREFORGET_BOW; }
    if (sTargetPose == "taunt")    { iTargetPose = ANIMATION_FIREFORGET_TAUNT; }
    if (sTargetPose == "victory1") { iTargetPose = ANIMATION_FIREFORGET_VICTORY1; }
    if (sTargetPose == "victory2") { iTargetPose = ANIMATION_FIREFORGET_VICTORY2; }
    if (sTargetPose == "victory3") { iTargetPose = ANIMATION_FIREFORGET_VICTORY3; }

    SetName (oTarget, oTargetName);
    SetObjectVisualTransform(oTarget, OBJECT_VISUAL_TRANSFORM_SCALE, oTargetSize);

    SetAILevel (oTarget, AI_LEVEL_HIGH);

    ClearAllActions();

    DelayCommand (1.5, ActionPlayAnimation (iTargetPose,1.0,1.0));
    DelayCommand (2.0, DoStatue(oTarget));
    DelayCommand (2.2, SetAILevel (oTarget, AI_LEVEL_VERY_LOW));
    DelayCommand (2.3, SetPlotFlag (oTarget, TRUE));
}

And the result is…

…cause it wouldn’t be The Hand without The Hand.


It’s still a little messy, and I need to spawn the creature on the fly, because if a paint it in an area, and there are no PC in it, when you reach that area the creature has been petrified without having been animated (that’s why I played with the AI LEVELS).

Feel free to use it, imrpove it, whateverit.

1 Like

Cool looking effect with the statue. Out of curiosity, what tileset is that?

That’s Sigil Stem Interior from ProjectQ

LOL - I should have known that.