Getting Started¶
If you’re brand new to nPose, you’re in the right place. This guide will walk you through the following steps:
- Getting the nPose Starter Kit
- Adding it to your own object
- Adding your own animations
- Setting the positions of those animations
You should be able to complete all these steps in about 20 minutes. Maybe a lot less!
Get the nPose Starter Kit¶
There are several packages on marketplace that contain the nPose scripts. For your first nPose object, the nPose Starter Kit is the simplest one to get started. Order it from the Marketplace. It’s free, and full perms.
Once you’ve received the Starter Kit object, try rezzing it on the ground and sitting on it. Click it while sitting and you should get a menu showing you the available poses. If you take a peek inside its contents, you should see notecards that give you a clue as to how it’s configured.
If you right click the object and select Open, you can extract its contents into a folder in your inventory.
Add nPose to your object¶
You can put nPose into any object you can modify. In this tutorial we’ll put it in a rug, and add some meditation poses. If you open the Library portion of your inventory, then go to Objects -> Household, you should find a “Rug, Red” object.
Edit the object and drag in the following items:
- All nPose scripts
- The meditation animation
Hold down the Ctrl button on your keyboard to select multiple items at once, then drag them.
If you have your own animation that you’d like to try, add that too!
Set a default pose¶
Now we’re going to make our pose appear in the menu. Create a new notecard in your inventory, and give it this name:
DEFAULT:Ommmm
Open up that notecard, and put this text inside it:
ANIM|meditation|<0,0,0>|<0,0,0>
Now drag that notecard into the rug’s contents.
With that single notecard, we’ve done several very important things:
- Since its notecard name starts with “DEFAULT:”, this pose set will be the default one used when the scripts first start up.
- By putting “Ommmm” after “DEFAULT:”, we’ve added a button labelled “Ommmm” to the root menu in the object. If you click the rug now, you should see that button as one of the options.
- By putting the “ANIM...” line in the notecard, we’ve told nPose that whenever someone selects the Ommmm button, the “meditation” anim should be played. We’ve also set the position and rotation that the avatar should have when that pose is played. (They’re both set to all zeroes at the moment, but we’re going to change that in a minute.)
Set the pose’s position and rotation¶
nPose includes an adjuster tool that can help you create properly-formatted ANIM lines for your pose notecards, with the positions and rotations you want. Follow these steps to adjust the position of your pose:
- Copy the “Adjuster” object and the “BTN:Utilities:Admin{owner}” notecard from the starter kit into your object.
- Sit on the object you’re configuring.
- Touch the object. Select Utilities, then Admin, then Adjust.
- A tall semi-transparent box will appear, with red, green, and blue sides. (This is the Adjuster object you added.)
- Edit Adjuster’s position and rotation. Your avatar should move to match. Keep adjusting the box until your avatar is in the right place. Each time you move the box, a new ANIM line will be printed in local chat, containing the position and rotation that you just set.
- Once your avatar is in the right place, copy the ANIM line from local chat and into the DEFAULT:Ommmm notecard.
Add a two-person pose set¶
So far you’ve configured nPose with a single-animation pose set, set it as the default, and given it a button in the root menu.
Let’s kick things up a notch by making a two-animation pose set, which isn’t the default, and has a button in a more deeply-nested menu.
From the starter kit, copy these items into your object:
- The layrelaxed animation.
- The sleep animation.
- The notecard named “BTN:Utilities:ChangeSeat”
Now create a new notecard in your inventory, and name it “SET:Couples:Sleep”. This will create a “Couples” entry in the root menu, and a “Sleep” entry in the Couples submenu. This is the same process as we did earlier with the DEFAULT card. The only difference is that an nPose object can only have one DEFAULT card, but it can have any number of SET cards.
Inside the “SET:Couples:Sleep” card, put these two lines:
ANIM|layrelaxed|<0,0,0>|<0,0,0>
ANIM|sleep|<0,0,0>|<0,0,0>
Now drop the card into the rug.
If you touch the object, you can again use the Utilities -> Admin -> Adjust button to rez the adjusters. This time since there are two anims in your card, two adjuster boxes will rez. (And they’ll actually be superimposed on top of each other, since we gave both lines the same position.)
Edit the adjuster position until your avatar is in the right place. Then copy the ANIM line from chat into the appropriate place in the notecard.
To adjust the position of the second animation, select Utilities -> ChangeSeat from the nPose menu. Your avatar should switch to the other animation, and you can use the other Adjuster object to position yourself in this animation. When you’re done, paste that line into the notecard too.
When you’re all done adjusting, use Utilities -> Admin -> StopAdjust button to get right of the adjusters.
You’ve now learned the basics of setting up menus and poses with nPose. For many creators, this is all you need to know. There is much more to learn, however, if you’d like to do more complex things, such as:
- setting face animations
- using props in your pose sets
- temporarily attaching items to people in certain poses
- triggering sounds, particles, or other scripts for certain poses
...and much more. Search the other documents on this site, or ask in the in-world discussion group if you have more questions about what nPose can do.