Don't click here unless you want to be banned.
LSL Wiki :
llScriptDanger
HomePage
::
PageIndex
::
RecentChanges
::
RecentlyCommented
::
UserSettings
:: You are crawling22.us.archive.org
**##[[integer]] llScriptDanger([[vector]] pos)##** **llScriptDanger is an outdated function. [[llGetParcelFlags]] should be used in its place** [[return Returns]] ##[[TRUE]]## if **##[[position pos]]##** is over public [[land]], land that doesn't allow everyone to edit and build, or land that doesn't allow outside [[script scripts]]. This function allows a script to find out if it's in danger of getting deleted or disabled. Note: this will still return ##[[TRUE]]## if the containing [[object]] is [[position located]] more than 45 [[meter meters]] above no-script [[land ground]]. The no-script "field" extends only 45m in the air, but only stops scripts from executing if they're not already running when they enter the zone ([[parcel]]/[[simulator region/simulator]]). (Say, if they're in [[attachments]] and the [[user]] [[teleport teleports]] in, or if the user tries to start a new script.) Scripts that are already running when they enter the zone will still work. To find out if the land is public, use ##[[llGetLandOwnerAt]]##. ##llScriptDanger## utility [[UserDefinedFunction function]]: %%(lsl) integer LAND_UNEDITABLE = 1; integer LAND_PUBLIC = 2; integer LAND_NO_SCRIPT = 4; // Returns as much data as possible about // the status of the land at the position // because llScriptDanger is so limited, // the integer it returns is a "best guess" // to the reason for the danger. integer landStatus(vector pos) { if (llGetLandOwnerAt(pos) == NULL_KEY) { return LAND_PUBLIC; } integer scriptDanger = llScriptDanger(pos); if (!scriptDanger) return 0; integer status = LAND_UNEDITABLE; // Check if the position is below the no-script height limit. // (Note: no-script land will be set as no-script anywhere over it, // but only scripts that attempt to START running under // 45m above the ground height will be disabled. // Scripts already running when they enter the parcel, // or those that start OVER 45m above the parcel will // all run within the no-script zone.) if (llGround(pos - llGetPos()) <= 45) { status = status | LAND_NO_SCRIPT; } return status; }%% **Q:** ''Is there a function to find out if the land has scripts off, or is no-build? Anything other than all-in-one?'' **A:** ''No, there's only ##llScriptDanger##, which returns all or nothing. You could check the results of ##[[llGetLandOwnerAt]]## to see if the land is public, but there's no way for a script to access any data beyond that.'' ''After the [[preview 1.9]] update, we'll be able to use ##[[llGetParcelFlags]]## to get all this info, though that will not work in the main grid yet.'' **Q:** ''In versions past, certain script functions wouldn't run in no-script zones, even if the scripts were otherwise already running. Is this still the case, and if so, is there a list of functions that currently do not run?'' **A:** ''##[[llParticleSystem]]## and ##[[llSetBuoyancy]]## continue running (but can't be re-executed) in no-script areas. There are probably other functions but I haven't tested them.'' -EepQuirk ---- [[functions Functions]] | [[land Land]] | [[simulator Simulator]] | [[script Script]]
Valid XHTML 1.0 Transitional
::
Valid CSS
:: Powered by
WakkaWiki 0.1.2