-
Notifications
You must be signed in to change notification settings - Fork 2
Ghost Tutorial: Custom Assets
Jasdac edited this page Dec 17, 2024
·
8 revisions
Props are things the ghost can interact with. There's some boilerplate code in place that lets you simplify the process. Let's create a bucket that the ghost can throw.
- Drop GhostInteractive and Portal into the bucket's inventory.
- Next I'm going to edit an existing asset (Blueberry soda) and unlink the STAINS prim. If you don't want a round STAINS prim you can pick any of the other assets that support handprints.
- I'll position the STAINS prim to the bucket so I can see it. A pro tip is to create a temporary light prim to make it more visible.
- Make the STAINS prim physics shape type None (not required, but recommended).
- Set the description to
GI$3$<0,1,0>. The 3 is a bitwise combination that says to allow stains and to let the ghost automatically throw this item. See GhostInteractive for more info. - Pick it up and put it into the level monitor. You can now add it to the level like you did in the placing props tutorial.
- Create your door mesh.
- Add a prim where you want the pivot point to be and link the door to it, making the new prim the root prim. Positive X should be pointing towards the handle.
- Drop the Door, Portal, and LocalConf scripts into the door.
- Edit the onStateEntry, onDoorOpen and onDoorClose sounds. The onStateEntry one will play while the player is dragging the door.
- Set the description to ["DO:INT",-1.57,0]. The first entry marks the door as an interior door. If it's an exterior door that should close when the ghost hunts, set it to DO:EXT instead. -1.57 is the max rotation of the door. The final value is a bitmask. See headers/Obstacles/Ghost/Door.lsh for more info. Set the description of any other prims to ROOT.
- Say SAVE to save it, then pick it up and put it in the monitor, and use the chat commands listed on the wiki index to test the door.