LlGetRegionFlags
De DigiWiki.
(Différences entre les versions)
| Ligne 1 : | Ligne 1 : | ||
<lsl> | <lsl> | ||
| - | |||
| - | |||
default | default | ||
{ | { | ||
touch_start(integer total_number) | touch_start(integer total_number) | ||
{ | { | ||
| - | + | if( llGetRegionFlags() & REGION_FLAG_SANDBOX ) | |
| - | + | { | |
| + | llOwnerSay("Region is a sandbox."); | ||
| + | } | ||
| + | else | ||
| + | { | ||
| + | llOwnerSay("Region is not a sandbox."); | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | </lsl> | ||
| - | + | <lsl> | |
| - | + | integer region_flags = llGetRegionFlags(); | |
| - | + | if (region_flags & REGION_FLAG_ALLOW_DAMAGE) | |
| + | llOwnerSay("This region is damage enabled!"); | ||
| - | + | if (region_flags & REGION_FLAG_FIXED_SUN) | |
| - | + | llOwnerSay("This regions sun doesn't move!"); | |
| - | + | ||
| - | + | if (region_flags & REGION_FLAG_BLOCK_TERRAFORM) | |
| - | + | llOwnerSay("This region does not allow terraforming!"); | |
| - | + | ||
| - | + | if (region_flags & REGION_FLAG_SANDBOX) | |
| - | + | llOwnerSay("This region is a sandbox!"); | |
| - | + | ||
| - | + | if (region_flags & REGION_FLAG_DISABLE_COLLISIONS) | |
| - | + | llOwnerSay("This region currently blocks non-agent collisions!"); | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | if (region_flags & REGION_FLAG_DISABLE_PHYSICS) | |
| - | + | llOwnerSay("This region currently blocks all physics!"); | |
| - | + | ||
| - | + | if (region_flags & REGION_FLAG_BLOCK_FLY) | |
| - | + | llOwnerSay("This region blocks flying!"); | |
| - | + | ||
| - | + | if (region_flags & REGION_FLAG_ALLOW_DIRECT_TELEPORT) { | |
| - | + | llOwnerSay("This region follows P2P rules!"); | |
| + | } else { | ||
| + | llOwnerSay("This region uses a telehub!"); | ||
} | } | ||
| + | |||
| + | if (region_flags & REGION_FLAG_RESTRICT_PUSHOBJECT) | ||
| + | llOwnerSay("This region restricts llPushObject!"); | ||
</lsl> | </lsl> | ||
Version actuelle en date du 6 novembre 2013 à 11:44
default { touch_start(integer total_number) { if( llGetRegionFlags() & REGION_FLAG_SANDBOX ) { llOwnerSay("Region is a sandbox."); } else { llOwnerSay("Region is not a sandbox."); } } }
integer region_flags = llGetRegionFlags(); if (region_flags & REGION_FLAG_ALLOW_DAMAGE) llOwnerSay("This region is damage enabled!"); if (region_flags & REGION_FLAG_FIXED_SUN) llOwnerSay("This regions sun doesn't move!"); if (region_flags & REGION_FLAG_BLOCK_TERRAFORM) llOwnerSay("This region does not allow terraforming!"); if (region_flags & REGION_FLAG_SANDBOX) llOwnerSay("This region is a sandbox!"); if (region_flags & REGION_FLAG_DISABLE_COLLISIONS) llOwnerSay("This region currently blocks non-agent collisions!"); if (region_flags & REGION_FLAG_DISABLE_PHYSICS) llOwnerSay("This region currently blocks all physics!"); if (region_flags & REGION_FLAG_BLOCK_FLY) llOwnerSay("This region blocks flying!"); if (region_flags & REGION_FLAG_ALLOW_DIRECT_TELEPORT) { llOwnerSay("This region follows P2P rules!"); } else { llOwnerSay("This region uses a telehub!"); } if (region_flags & REGION_FLAG_RESTRICT_PUSHOBJECT) llOwnerSay("This region restricts llPushObject!");


