| Author | Sticky: Post Working Scripts Here |
| Andalus | Posted: Thursday, 04 July 06:36PM |
| After much trial and tribulation, I’ve put
together the following collection of scripts that allow PCs to pick up and
move placeable objects (chairs, in this case). Everything works except for
setting the facing after placement – if someone can get that working, please
let me know! What does it do These scripts will allow PCs to both sit in and to pick up and reposition chairs. What would I use this for? Initially, I started working on the folding chair to allow PCs to reposition tavern furniture to suit the needs of the moment - to sit around tables, or set up concert seating, for example. However, these same methods could be applied to any placeable object you want the PCs to be able to move (stools, anvils, corpses, etc.). Note, if you only want PCs to be able to pick up the object (and not sit or perform some other action as well), then you can get rid of the coversation and put the appropriate script in the OnUsed event of the object. How does it work? There are several steps involved, but nothing's too complicated. 1) Create a custom chair object. Make it useable. I called mine "Folding Chair" (with "FoldingChair" as the tag). NOTE: You could just use the standard chair object, if you plan to let PCs pick up every chair you place. NOTE2: If you're running scripts that make NPCs sit in chairs, you'll need to update those to make them look for both standard chair objects and your new custom chair objects. 2) Create a custom item to represent the chair in the PC's inventory. Use something innocuous; I used a book. (NOTE: There aren't any appearances available that look much like a chair. I used a book because it sort of looks like it could be a chair that's folded up, and because it's not equipable or useable.). Be sure to give this item a name that will let PCs know what they're carrying. I used "Folded Chair." It also helps to put something in the description explaining that this object is in fact a chair. You may also want to make the item heavier: Properties -> Weight Increase. 3) In the OnUsed event of the "Folding Chair" object, place the following script:
|
|