-
Notifications
You must be signed in to change notification settings - Fork 3
Rezzing and Derezzing Props
This exercise is set up to use the Object that was made in Simple Single Sitter. nPose has the ability to rez props and position them as needed to make your scene as real as possible.
nPose has the ability to:
- Rez or derez a prop at the click of a menu button.
- Rez or derez a prop in conjunction with the click of a menu button which changes a pose set.
- Rez or derez a prop at some time after a menu click event.
- Rez or derez a prop only if a sitter sits in a particular seat.
- Rez or derez multiple copies of a prop at different positions.
- Rez a prop and associated it with a specific prop group number for better control of derezzing props.
- Rez a prop set to be used with temp attach.
- This list could probably go on and on to include more imaginative ways of doing things in SL.
To make all this work we need to add a plugin into contents of the object we set up here: Simple Single Sitter. You must also add this same plugin in the contents of the prop to be rezzed. LocatenPose V4.00 PROP ~ boxed
and unpack it. In this package find this script to be used as above:nPose Prop Plugin V4.00
If you do not have this package you can find it inworld Here.
All we need to do to rez this prop are as follows:
- When the prop plugin has been added to the prop, take this prop back into your inventory.
- Add this prop to the Object from your inventory.
- Make a notecard in your inventory and name it SET:Rez Prop.
- In the contents of this new notecard add the following line:
PROP|propName|<0,0,1>|<0,0,0>
- Save and close this notecard.
- Add it to your nPose object.
For PROP line syntax look HERE.
You should now be able to click for menu and see the menu button "Rez Prop" and it should rez your prop as expected.
Adjusting the prop is easy. Simply edit that prop and move it into position. The prop will report a line in local for you to copy and replace in the notecard for permanent usage.
- Make another notecard in your inventory and name it SET:Prop Die.
- Edit the new notecard and add the following line:
PROP_DO|*|*||DIE
- See usage for PROP_DO Here.
- Save and close the notecard.
- Add it to the nPose object.
- Now test the Prop Die menu button.
To rez a prop when selecting a pose is as easy as adding the PROP line inside the pose card which has the XANIM line(s) inside. nPose will rez the prop and animate the sitter(s).
This is a little advanced but not difficult to understand.
-
Please note this is probably not something that anyone would use in a practical application. It is only an example which can be used in other notecards besides the DEFAULTCARD.
Have a look at Button Permissions. Button permissions in that context are for menu buttons, however new in V4.00, we have the ability to use these permissions inside a notecard for every key word we use. We can restrict that PROP line from running unless the new sitter is seated in a specific seat. To do this follow this example: - Edit the SET:DEFAULTCARD
- Add the following line:
PROP{1}|1|propName|<positionVector>|<rotationVector>
- NOTE: the permissions for the key word PROP is set to seat 1, meaning that this PROP line will not be processed unless someone is sitting in seat 1 when this notecard is processed. All other PROP lines will be processed based upon their permissions.
Lines within a notecard are processed (based upon each lines' permissions) when nPose is told to read this notecard (when the menu button is clicked to run this notecard).
Have nPose process all the PROP lines but hold off on running each of the prop lines until specific seat is filled
The difference here from the above example is that above nPose would only look at these lines when the notecard is read. If no sitter at that time is present in a specific seat, then the command is forgotten. Here the lines are going to be read but not forgotten and each line will run only if some AV comes along and sits in that seat. nPose does not forget the lines when they are read, rather nPose saves them for execution when a sitter enters a specific seat.
For nPose to act this way it needs a plugin that will remember the commands. That plugin is named SAT-NOTSAT.
- Locate the plugin 'nPose SAT-NOTSAT Plugin V4.00' and add this plugin to the nPose object.
- Add another line to the SET:DEFAULTCARD and we will set this one up for seat 2. Add the following line:
ON_SIT{2}|2|PROP|propName|<positionVector>|<rotationVector>
- NOTE: The SAT-NOTSAT plugin will recognize this key word (ON_SIT) and save the PROP line to use if a sitter enters seat 2.
- Save and close the notecard.
Give it a try.
Temp attach props use the exact same PROP plugin as all the above. There are a few steps required to set up temp attach objects before they are ready for use. Temp attach objects can be set up to attach to any of the locations available on any Avatar.
- Select the object you wish to use for temp attach in your inventory.
- NOTE: If you wish to have others use this temp attach, the next owner permissions must be full perm or the temp attach will fail.
- Decide which of the attach points you wish to use when attaching this object.
- From your inventory rt click and the object and select 'Attach To' or 'Attach To HUD'.
- Select the attach point you've decided to use and attach the object.
- Rt click the object in inventory and select 'Edit'.
- Adjust the temp attach object to the position that looks good while attached.
- Add the nPose Prop Plugin V4.00 to contents of the temp attach object.
- Detach from self.
- Add the temp attach object to the contents of the nPose object.
- Now the temp attach object is ready for use. The temp attach object will remember this adjustment for us and use it when attached to this point. The only thing left now is to set up instructions for nPose to follow.
- Create a notecard in your inventory and name it SET:Attach.
- Edit the card and add a PROP line to rez the temp attach object. The object needs to be rezzed to complete the temp attach.
PROP|tempAttachObjectName|<0,0,1>|<0,0,0>
- Look here to find the number for the attach point you've selected to use.
- Use PROP_DO and concatenate Temp Attach to create the following line to tell the temp attach object to do it's thing.
PROP_DO|tempAttachObjectName|||TEMPATTACH|%AVKEY%|attachPointNumber
- Save and close the notecard.
- Add it to the nPose object.
This should be everything you need to have nPose temp attach this object. Give it a try.
Detaching is exactly like making props die. Use the PROP_DO as we did above. If you'd like to call it by name, do the following:
* PROP_DO|tempAttachObjectName|*||DIE
If you wish to continue on and check out how to work with Animesh as a prop, follow this link.
-
Getting started
-
Reference
-
Changelogs
-
Internals