Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

How do I scale the size of a creature not on screen?

So I know you can increase the size of a creature or object on the screen, but how do I do it so the size increase sticks permanently in the creature list on the right? Could someone give me a script I an put in heartbeat or onspawn please?

Comments

  • StonekingStoneking Member Posts: 39
    Thats not what I wanted. You can't scale weapons with that method

  • AncarionAncarion Member Posts: 155
    You could put the scaling function in the creature's OnSpawn script, so every time it's instantiated it will have the intended size. I use a slightly more complicated method that first checks for a variable for creatures I want to have a fixed size, and then uses a randomized scaling factor for all the rest, so there's a variety of sizes when multiples are created.. I put this bit in nw_c2_default9:

    if (GetLocalInt(OBJECT_SELF,"NO_SCALE")!=1)
    {
    float fScaleSize=GetLocalFloat(OBJECT_SELF,"SCALE_SIZE");
    if (fScaleSize==0.0)
    {
    fScaleSize=1.0+(IntToFloat(Random(11))/100.0)*IntToFloat(Random(3)-1);
    }
    SetObjectVisualTransform(OBJECT_SELF,OBJECT_VISUAL_TRANSFORM_SCALE,fScaleSize);
    }

    If you just want a fixed size, just put the last line of code in your OnSpawn script, and substitute fScaleSize with whatever value you prefer.

    Stoneking
  • StonekingStoneking Member Posts: 39
    Ancarion wrote: »
    You could put the scaling function in the creature's OnSpawn script, so every time it's instantiated it will have the intended size. I use a slightly more complicated method that first checks for a variable for creatures I want to have a fixed size, and then uses a randomized scaling factor for all the rest, so there's a variety of sizes when multiples are created.. I put this bit in nw_c2_default9:

    if (GetLocalInt(OBJECT_SELF,"NO_SCALE")!=1)
    {
    float fScaleSize=GetLocalFloat(OBJECT_SELF,"SCALE_SIZE");
    if (fScaleSize==0.0)
    {
    fScaleSize=1.0+(IntToFloat(Random(11))/100.0)*IntToFloat(Random(3)-1);
    }
    SetObjectVisualTransform(OBJECT_SELF,OBJECT_VISUAL_TRANSFORM_SCALE,fScaleSize);
    }

    If you just want a fixed size, just put the last line of code in your OnSpawn script, and substitute fScaleSize with whatever value you prefer.

    Thank you

Sign In or Register to comment.