- Door Prim scripts are designed for operating vehicle doors, gloveboxes, trunks, or any prim that needs to reposition when activated. They can be a single prim, such as a sculpted hood, or groups of prims, like a car door prim with separate mirror prim, glass window prim and sculpted door handle prim.
- Door prims or prim groups are activated by touch. If the vehicle is locked, only the owner will be able to open/close them. If the vehicle is in group access mode, then anyone in the group can activate them.
- Door Prim script positions are recorded with the Mechanic HUD. You do not need to use script injection if you manually place the Door Prim script in the prim(s).
- There is no specific limit into how many individual or groups of prims you can set up.
- Recorded door positions will adjust if the vehicle is re-sized using the resizer.
- Door prims will remove themselves from the normal drive/ride stored positions of the Prim Control scripts. That way they stay open/closed when parking or unparking if you have a stored park routine using the Prim Control scripts.
- Yes you can customize the door sounds, see Door Sounds below.
- There are TWO types of door systems. The Single Prim system , and the Grouped Prim system. These have different scripts and setup. The Single Prim is the quickest and easiest to set up. You should use the single prim system unless your door is made up of multiple individual prims that must move together, then you need the Grouped Prim system. You can mix the different systems in an individual build.
Single Prim Door Setup (easiest and fastest)
1. Place or inject a Single Prim Door script into the prim while it is in the closed position. It can be the Smooth or Fast version. The Smooth version has a slower transition between open and closed.
2. Connect the Mechanic HUD to the vehicle and press CLOSE DOORS to make sure any previously scripted Single Prim doors are in the closed position.
3. Press RECORD CLOSED on the Mechanic HUD. Your newly scripted door prim has now recorded the closed position.
4. Press OPEN DOORS on the Mechanic HUD to open any previously recorded Single Prim doors.
5. Manually reposition the NEW door prim to the open position and press RECORD OPEN on the Mechanic HUD. Your newly scripted door prim has now recorded the open position.
- Now you can open and close the new door by touch. Add sound by adding sounds named open or closed or both to the specific prim.
- A Single Prim door will not open until you record both an open and closed position.
- To add another door later, repeat the instructions above.
- You can mix and match the Smooth and Instant version of the doors, and your build can also contain Grouped Door Prim scripts, though those have a different setup (see below)
You are all done! If you want you can return later and add more door prims.
Grouped Door Prim Setup
If your door or other touch activated opening component is made up of more than one prim, then you must use the Grouped Door Prim script and follow this setup:
1. Place Grouped Door Prim scripts into the prim or prims that will be used as doors.
2. Set door prims into Setup Mode using SET ACTIVE DOOR PRIMS TO SETUP MODE (if they are not already showing that they are in Setup Mode indicated by floating text)
3. Select from those the specific door prims to record using SELECT SCRIPTED DOOR PRIMS TO RECORD and then touching those prims, the touched prims will begin flashing so you know which prim or prims is ready to go.
4. Record the closed position of those prims by pressing RECORD SELECTED DOOR PRIMS AS CLOSED
5. Move those prims manually to the open position and press RECORD SELECTED DOOR PRIMS AS OPEN
The prim(s) will return to the closed position and you can touch them to open/close that prim or prim group.
Expanded explanation for Grouped Door Prim setup
Because door prims are touch activated once they are set up and working (in Active Mode), the scripts inside must first be put into Setup Mode (indicated by floating text) before you can select them by touch for recording open and closed positions. This is done with the Mechanic HUD so it must be connected to the vehicle for door prim setup. Only selected prims that are flashing will be recorded when you actually press the position record button, so it is normal for other door prims in the build to be in Setup Mode (and not flashing) while you are recording.
Setting up door prims is probably one of the last things you want to do in your building process, but it is no problem to go back and edit your recorded positions later.
The word "door" here may refer to whatever purpose your touch-activated prim is being used for, be it hood, door, antenna, hard top, reclining seats, pop-up spoiler, etc etc.
Expanded setup:
- First get a door script inside a prim or prims in your vehicle. Use either INJECT DOOR PRIM on the Mechanic HUD (IF you have set up the vehicle prims for script injection) or place Door Prim script(s) manually into the prim or prims that will become a "door".
- After first being placed in a prim, the script will indicate that it is in Setup Mode with floating text.
- On the Mechanic HUD, press SELECT SCRIPTED DOOR PRIMS TO RECORD and touch the prim (or prims) to select them for editing. It/they will be flashing green.
- Now you have chosen the prim (or group of prims) to work with for this particular door. Assuming this prim or prims is already in the closed position, press RECORD SELECTED DOOR PRIMS AS CLOSED.
- Now the selected prims will be flashing yellow. Move the flashing prim or prims into the open position and press RECORD SELECTED DOOR PRIMS AS OPEN.
- The prim(s) will automatically go into Active Mode, and now touching them will make them open and close!
- In order to do any more editing on those prims' recorded positions , you will need to put them back into setup mode using SET ACTIVE DOOR PRIMS TO SETUP MODE and re-select and record. Setting a prim into Setup Mode does not erase its stored position until you intentionally select it and record a new position for it.
- When you are done working on door positions, if any prims still show as being in Setup Mode, press SET ALL DOOR PRIMS INTO ACTIVE MODE.
That may sound like a lot of steps but it will make sense when you need to go back and add more doors or adjust your existing ones. The main thing when you go back to work on doors later is to use SET ACTIVE DOOR PRIMS TO SETUP MODE so that you can select prims to edit, and when finished use SET ALL DOOR PRIMS INTO ACTIVE MODE.
Notes
- Door prims that are grouped do not need to be connected. You may for example, record both front doors open and closed as one group using Grouped Door Prims , so touching either door will close both.
Door Sounds
There is a built in click sound that you can replace by adding sounds named open and closed to the door prim. You can add one or the other or both. In a door prim grouping, the sound is generated from the prim that is actually touched. So if your prim grouping consists of a car door, mirror, glass window and sculpted door handle, you could probably place the sounds just in the larger door prim that is most likely to be touched for opening/closing purposes.