Difference between revisions of "User:Rev Eponym"

From Second Life Wiki
Jump to navigation Jump to search
(Replaced content with "A lurching, timber world.")
Line 1: Line 1:
{{void-box
A lurching, timber world.
|title=nPose new documentation
}}
 
{{KBwarning|If you're reading this, it is unofficial. Testing and composition only!}}
 
nPose is a system for coordinating animations between several avatars seated on the same object (linkset), such as a couch or bed, as well as rezzable, coordinated props.  Unlike previous systems, nPose does not use poseballs to accomplish this.
 
{{void-box
|title=What's a 'posing system'?
|content=Null
 
}}
 
==nPose Notecard Types==
 
nPose uses different types of notecards to define its customized menu functions. Each of these notecards has its type spelled out in capitals at the beginning of its name, like so:
 
{| {{KBtable}}
|- {{KBtablehead}}
! Notecard Type
! Function
! ..
! Example name
 
|-
| DEFAULT
| Animations
| ..
| DEFAULT:Sitting
 
|-
| SET
| Animations
| ..
| SET:Lounging
 
|-
| BTN
| Script messaging
| ..
| BTN:Colors
 
|-
| SEQ
| Sequences of Sets
| ..
| SEQ:Line Dance
 
|}
 
{{KBcaution|It's very important that the type name be in all caps, with no spaces, with a colon before the rest(':').
Without this, the scripts won't be able to find the notecards, and the item will not appear in the menu.}}
 
 
'''DEFAULT''' - This notecard is the same as SET except it's contents become the default pose set when nPose is first initialized.  If no DEFAULT notecard is included in the contents of the nPose object, nPose will use the first notecard in the contents (alpabetically) as a DEFAULT.
 
 
'''SET''' - This notecard is most commonly used to tell the nPose engine it has an animation within.  It defines the number of sitters, their pose, their position and rotation and facial expressions.  It can also be used for doing specific things when someone sits or when someone stands.  Props can be rezzed specific to a scene. Messages can be sent to other scripts. The general format of the text inside a SET notecard to trigger an animation is (without spacing before the ANIM or other keyword):
 
<code>ANIM|meditation|<-0.3,0,0.8>|<0,0,0></code>
 
where ANIM says that this line describes an animation, and "mediation" is the name of the animation (which must be included in the nPose object), and the rest is a position offset and rotation. There is one ANIM  line for each avatar who can sit on the nPose object. You can put <0,0,0> for both position and rotation, and use the nPose adjustment tool to find the proper values. We'll describe how later. You can also include LINKMSG and other types of lines in the SET notecards, and those will be described later also.
 
 
'''BTN''' - This notecard type is used to send messages to other scripts immediately and typically used to communicate with other scripts (mostly plugin scripts) in the nPose build or props.  This is a powerful notecard type and can be used for a wide variety of things.
 
The most common thing to put in BTN notecard is LINKMSG lines. These have the general format (again without leading spaces):
 
<code>LINKMSG|msg-number|user-string|some-key</code>
 
where msg-number is some number set by convention (see the LINKMSG messages notecard) and the remaining (optional) fields are defined by the message number.
 
'''SEQ''' - This notecard type is used to setup sequences of pose sets.  It communicates to the modified Rygel sequencer script. Details are provided later.
 
 
<lsl>
default
{
    state_entry()
    {
        llSay(0, "Hello, Avatar!");
    }
    touch_start(integer total_number)
    {
        llSay(0, "Touched.");
    }
}
</lsl>

Revision as of 22:30, 29 March 2013

A lurching, timber world.