Difference between revisions of "LlSetVehicleFlags"
Jump to navigation
Jump to search
All Issues ~ Search JIRA for related Bugs
(Added caveats according to https://community.secondlife.com/forums/topic/475994-llsetvehicleflags-is-a-prim-property) |
|||
(10 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{LSL Function | ||
|func_id=236|func_sleep=0.0|func_energy=10.0 | |||
|func=llSetVehicleFlags | |||
|p1_type=integer|p1_subtype=bit mask|p1_name=flags|p1_desc=mask of VEHICLE_FLAG_* flags | |||
|func_footnote | |||
|func_desc=Enabled the specified vehicle {{LSLP|flags}} | |||
|return_text | |||
|spec | |||
|caveats= | |||
* Some vehicle flags may remain enabled after script reset. Use [[llRemoveVehicleFlags]] to disable any flags that would interfere with the correct functioning of your vehicle. | |||
* [[VEHICLE_FLAG_MOUSELOOK_STEER]] and [[VEHICLE_FLAG_MOUSELOOK_BANK]] only turn the vehicle up to the current [[VEHICLE_ANGULAR_MOTOR_DIRECTION]]; If VEHICLE_ANGULAR_MOTOR_DIRECTION is set to [[ZERO_VECTOR]], then the vehicle will not turn. | |||
|constants={{LSL Constants/Vehicle Flags}} | |||
|examples | |||
|helpers | |||
|also_functions={{LSL DefineRow||[[llRemoveVehicleFlags]]|Remove vehicle flags}} | |||
|also_events | |||
|also_tests | |||
|also_articles={{LSL DefineRow||[[Linden Vehicle Tutorial]]}} | |||
|notes | |||
|permission | |||
|cat1=Vehicle | |||
|cat2 | |||
|cat3 | |||
|cat4 | |||
}} |
Latest revision as of 21:55, 20 August 2021
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: llSetVehicleFlags( integer flags );236 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Enabled the specified vehicle flags
• integer | flags | – | mask of VEHICLE_FLAG_* flags |
Flags | Description | |
---|---|---|
VEHICLE_FLAG_NO_DEFLECTION_UP | 0x001 | This flag prevents linear deflection parallel to world z-axis. This is useful for preventing ground vehicles with large linear deflection, like ![]() |
VEHICLE_FLAG_LIMIT_ROLL_ONLY | 0x002 | For vehicles with vertical attractor that want to be able to climb/dive, for instance, airplanes that want to use the banking feature. |
VEHICLE_FLAG_HOVER_WATER_ONLY | 0x004 | Ignore terrain height when hovering. |
VEHICLE_FLAG_HOVER_TERRAIN_ONLY | 0x008 | Ignore water height when hovering. |
VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT | 0x010 | Hover at global height instead of height above ground or water. |
VEHICLE_FLAG_HOVER_UP_ONLY | 0x020 | Hover doesn't push down. Use this flag for hovering vehicles that should be able to jump above their hover height. |
VEHICLE_FLAG_LIMIT_MOTOR_UP | 0x040 | Prevents ground vehicles from motoring into the sky. This flag has a subtle effect when used with conjunction with banking: the strength of the banking will decay when the vehicle no longer experiences collisions. The decay timescale is the same as VEHICLE_BANKING_TIMESCALE. This is to help prevent ground vehicles from steering when they are in mid jump. |
VEHICLE_FLAG_MOUSELOOK_STEER | 0x080 | Steer the vehicle using the mouse. Use this flag to make the angular motor try to make the vehicle turn such that its local x-axis points in the same direction as the client-side camera. |
VEHICLE_FLAG_MOUSELOOK_BANK | 0x100 | Same as above, but relies on banking. It remaps left-right motions of the client camera (also known as "yaw") to rotations about the vehicle's local x-axis. |
VEHICLE_FLAG_CAMERA_DECOUPLED | 0x200 | Makes mouselook camera rotate independently of the vehicle. By default the client mouselook camera will rotate about with the vehicle, however when this flag is set the camera direction is independent of the vehicle's rotation. |
VEHICLE_FLAG_BLOCK_INTERFERENCE | 0x400 | Prevents attachments worn by the vehicle's passengers from pushing the vehicle via llPushObject and similar functions. |
Caveats
- Some vehicle flags may remain enabled after script reset. Use llRemoveVehicleFlags to disable any flags that would interfere with the correct functioning of your vehicle.
- VEHICLE_FLAG_MOUSELOOK_STEER and VEHICLE_FLAG_MOUSELOOK_BANK only turn the vehicle up to the current VEHICLE_ANGULAR_MOTOR_DIRECTION; If VEHICLE_ANGULAR_MOTOR_DIRECTION is set to ZERO_VECTOR, then the vehicle will not turn.