Charolotte Caxton Posted August 11, 2011 Share Posted August 11, 2011 If I wanted to make or find a script that would allow me to hug an object, like a huggable teddy bear or what not, where would I go?Thank you. Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted August 11, 2011 Share Posted August 11, 2011 The important part would be an animation. What you would need on top is a very simple animation player - play animation on attach - that you will easily find in libraries or script collectors inworld groups. If you want bells and whistles, you'd have to do it or you'd have to look for a scipter Link to comment Share on other sites More sharing options...
Charolotte Caxton Posted August 11, 2011 Author Share Posted August 11, 2011 I just wanted something simple, like when you get a huggable gift? Is that more the animation department? I was thinking I could just drop a script into something to make it huggable and I thought with all the huggables around it would be common if not free. Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted August 11, 2011 Share Posted August 11, 2011 The actual hug is an animation. The script you would need plays the animation as soon as you attach der huggable. I'm sure you'll find both elements free. If you can't find the script, drop me a line inworld Link to comment Share on other sites More sharing options...
Charolotte Caxton Posted August 11, 2011 Author Share Posted August 11, 2011 Oh Darkie, I am totally at a loss. I thought it would be easier than this Link to comment Share on other sites More sharing options...
Ishtara Rothschild Posted August 11, 2011 Share Posted August 11, 2011 I'll send you a simple hugging animation In addition to the animation, you need one of the following scripts. The first script simply plays the animation when the object is attached: default{ on_rez(integer nevermind) { llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); } run_time_permissions(integer perm) { if(perm) llStartAnimation(llGetInventoryName(INVENTORY_ANIMATION,0)); } } The problem is that the animation will likely be overridden as soon as your AO animation changes. The next script more or less solves this problem by restarting the hug animation every second: string anim;default{ on_rez(integer nevermind) { llSetTimerEvent(0); llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); anim = llGetInventoryName(INVENTORY_ANIMATION,0); } run_time_permissions(integer perm) { if(perm) llSetTimerEvent(1); } timer() { llStartAnimation(anim); }} The next script does the same, but it also allows the user to stop hugging the object by clicking it. Another click will start the hug animation again: string anim;integer toggle;default{ on_rez(integer nevermind) { llSetTimerEvent(0); llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); anim = llGetInventoryName(INVENTORY_ANIMATION,0); } run_time_permissions(integer perm) { if(perm) llSetTimerEvent(1); } timer() { llStartAnimation(anim); } touch_start(integer total_number) { toggle=!toggle; if(toggle) { llSetTimerEvent(0); llStopAnimation(anim); } else llSetTimerEvent(1); }} Note that some AO animations will override the hugging animation no matter what. There are too many animations with priority 4 in SL, which is the highest priority, so they will fight for control if you play multiple animations at the same time. But in most cases it should work. Link to comment Share on other sites More sharing options...
Charolotte Caxton Posted August 11, 2011 Author Share Posted August 11, 2011 Thank you, Ishtara! By the way, cool new little avi badge! Link to comment Share on other sites More sharing options...
Ishtara Rothschild Posted August 11, 2011 Share Posted August 11, 2011 Thanks 1 Link to comment Share on other sites More sharing options...
Poenald Palen Posted August 13, 2011 Share Posted August 13, 2011 Yes, you will need Hug animations as well. I can't find any for objects. But, I only searched for "object hug" and the search is....well, to literal slanting. It doesn't 'guess' to much. It is very possible no one has made any general ones. Many objects are such different sized. edit: Oh, the whole reason I posted. You can use QAvimator to easily make animations. There are lots of tutorials. And then you upload it and name them and put the name into the string anim part liek this: string anim = "Big Hug" I mean, IF the hug is named Big Hug. The name you see in inventory is what is used..oh, and put the script and the ainimation into the objects contents to....though this might have been mentioned. But, my idea was that you can make big, medium and small hugs. Then you can open those files and make them different when you need to and then upload the new adjusted one that works better. Test on beta grid for free uploads. Beta can also work for quick pics of things you can't afford to upload as well. Uh...ok, that is all. Link to comment Share on other sites More sharing options...
Charolotte Caxton Posted August 13, 2011 Author Share Posted August 13, 2011 Thanks Mr. Poptart Monster! 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