Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- default
- {
- state_entry()
- {
- llSetLinkPrimitiveParamsFast(LINK_SET_TEXTURE, ALL_SIDES, <0.0, 0.0, 0.0, 0.0>); // Make the avatar invisible
- }
- on_rez(integer start_param)
- {
- llSetLinkPrimitiveParamsFast(LINK_SET_TEXTURE, ALL_SIDES, <0.0, 0.0, 0.0, 0.0>); // Make the avatar invisible
- }
- // This function is called when the avatar collides with an object.
- // We use this to check if the object is a wall and allow the avatar to pass through it.
- collision_start(integer num_detected) list detected_pos, list detected_rot, list detected_vel, list detected_key)
- {
- for (integer i = 0; i < num_detected; i++)
- {
- key objectKey = detected_key[i];
- vector objectPos = detected_pos[i];
- // Check if the object is a wall. You can adjust this check based on your needs.
- if (llGetLinkPrimitiveParamsFast(objectKey, LINK_PRIM_TYPE) == PRIM_TYPE_BOX)
- {
- llSetLinkPrimitiveParamsFast(LINK_SET_TEXTURE, ALL_SIDES, <0.0, 0.0, 0.0, 0.0>); // Make the avatar invisible for a short duration
- llSleep(0.1); // Wait for a short time
- llSetLinkPrimitiveParamsFast(LINK_SET_TEXTURE, ALL_SIDES, <1.0, 1.0, 1.0, 1.0>); // Make the avatar visible again
- llSetPos(objectPos + <0, 0, 1>); // Move the avatar slightly forward to avoid getting stuck
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement