XbabylonX Posted December 7, 2011 Share Posted December 7, 2011 Hello, since im noob on these, I manages today to to click on an object in order to rez a poseball.Now I want to "kill" that poseball by clicking a different object.I searched about unrez trigger but says its unavailable.What is the solution for that?Thank you. Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted December 7, 2011 Share Posted December 7, 2011 let me see if I understand correctly: you click object A object B gets rezzed as a result now you click object C object B gets unrezzed What you need to do is use llDie() - it can, however only caled from within the object that dies. What you need, thus, is a way to communicate: C has to tell B that it got touched. Look at llSay, llListen() and listen I hope that will help you. Link to comment Share on other sites More sharing options...
XbabylonX Posted December 7, 2011 Author Share Posted December 7, 2011 Yes, just like that. Like sitting on a poseball, do what u do and then when u clikc the STOP button on the dialogue, u stand up and the poseball disappears. Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted December 7, 2011 Share Posted December 7, 2011 Great - so you have all the ingredients you need, now. Btw.: You could of course also de-rezz the object when the avatar get off the object Link to comment Share on other sites More sharing options...
XbabylonX Posted December 7, 2011 Author Share Posted December 7, 2011 U mean by clicking on Stand Up button located at the center bottom? If yes, I would like that better. Link to comment Share on other sites More sharing options...
Rolig Loon Posted December 7, 2011 Share Posted December 7, 2011 In that case, in the changed event, where you have your test to see if someone is sitting on the object, just add the reverse test ... else if(!AvatarOnSitTarget()){ llDie();} Or, since you want to kill the other object, send your kill message to it from that if test. Link to comment Share on other sites More sharing options...
XbabylonX Posted December 7, 2011 Author Share Posted December 7, 2011 But I dont use anywhere IF==avataronsittarget Link to comment Share on other sites More sharing options...
Rolig Loon Posted December 7, 2011 Share Posted December 7, 2011 Then how does your poseball know that you sat on it? Link to comment Share on other sites More sharing options...
XbabylonX Posted December 7, 2011 Author Share Posted December 7, 2011 Ok this is what I used on poseball string animation; // Variable to store the name of the animation.string text = "Sit"; // Enter the float text here.default{ //Initialize state_entry() { llSitTarget(<0,0,0.7>, ZERO_ROTATION); // Set's the sit target position and rotation. Don't set the first param to <0,0,0> because that will cause llAvatarOnSitTarget to fail. llSetPrimitiveParams([PRIM_PHANTOM, TRUE]); // Make object phantom so people don't trip over it llSetAlpha(1.0, ALL_SIDES); // Initialize the object's alpha to visible llSetText(text, <0,0,1>, 1.0); //Set the float text and make it visible } // Called when an agent sits or unsits changed(integer change) { if(change & CHANGED_LINK) { if(llAvatarOnSitTarget() != NULL_KEY) // Makes sure there is a key from the avatar { llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_TRIGGER_ANIMATION); // If so, request perms to play anim. } else //If not (Key is null) then agent unsat. Stop animation, make object visible, make float text visible { integer perm=llGetPermissions(); llStopAnimation(animation); llSetAlpha(1.0, ALL_SIDES); llSetText(text, <0,0,1>, 1.0); } } } // Called when permission to play anim are requested run_time_permissions(integer perm) { if (perm & PERMISSION_TRIGGER_ANIMATION) { llStopAnimation("sit"); // Stop the default sit animation animation=llGetInventoryName(INVENTORY_ANIMATION,0); // Get the name of the animation in the object inventory llStartAnimation(animation); // Start the found animation llSetAlpha(0.0, ALL_SIDES); // Make oject tranparent llSetText(text, <0,0,1>, 0.0); // Hide the float text } }} Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted December 7, 2011 Share Posted December 7, 2011 just change the else case in the changed event: string animation; // Variable to store the name of the animation.string text = "Sit"; // Enter the float text here.default{ //Initialize state_entry() { llSitTarget(<0,0,0.7>, ZERO_ROTATION); // Set's the sit target position and rotation. Don't set the first param to <0,0,0> because that will cause llAvatarOnSitTarget to fail. llSetPrimitiveParams([PRIM_PHANTOM, TRUE]); // Make object phantom so people don't trip over it llSetAlpha(1.0, ALL_SIDES); // Initialize the object's alpha to visible llSetText(text, <0,0,1>, 1.0); //Set the float text and make it visible } // Called when an agent sits or unsits changed(integer change) { if(change & CHANGED_LINK) { if(llAvatarOnSitTarget() != NULL_KEY) // Makes sure there is a key from the avatar { llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_TRIGGER_ANIMATION); // If so, request perms to play anim. } else //If not (Key is null) then agent unsat. Stop animation, make object visible, make float text visible { integer perm=llGetPermissions(); llStopAnimation(animation); //llSetAlpha(1.0, ALL_SIDES); //llSetText(text, <0,0,1>, 1.0); llDie(); } } } // Called when permission to play anim are requested run_time_permissions(integer perm) { if (perm & PERMISSION_TRIGGER_ANIMATION) { llStopAnimation("sit"); // Stop the default sit animation animation=llGetInventoryName(INVENTORY_ANIMATION,0); // Get the name of the animation in the object inventory llStartAnimation(animation); // Start the found animation llSetAlpha(0.0, ALL_SIDES); // Make oject tranparent llSetText(text, <0,0,1>, 0.0); // Hide the float text } }} that should do the trick Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now