Created
September 9, 2014 14:42
-
-
Save antonyfairport/bdfebc329a1ad56d5182 to your computer and use it in GitHub Desktop.
Particle "Hologram"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vector IMAGE_SIZE = < 1.0, 1.0, 1.0 >; | |
default | |
{ | |
state_entry() | |
{ | |
// Look for an image in inventory. | |
string sImage = llGetInventoryName( INVENTORY_TEXTURE, 0 ); | |
// Got one? | |
if ( sImage ) | |
{ | |
// Yup. Show it as a "hologram" above this prim. | |
llParticleSystem( [ | |
PSYS_PART_FLAGS, PSYS_PART_FOLLOW_SRC_MASK | | |
PSYS_PART_EMISSIVE_MASK, | |
PSYS_SRC_TEXTURE, sImage, | |
PSYS_PART_START_SCALE, IMAGE_SIZE, | |
PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_DROP | |
] ); | |
} | |
} | |
changed( integer change ) | |
{ | |
if ( change & CHANGED_INVENTORY ) | |
{ | |
llResetScript(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment