Change font size
It is currently Wed Oct 23, 2019 10:06 am

Forum rules


{L_IMAGE}



Post a new topicPost a reply Page 1 of 1   [ 4 posts ]
Author Message
 Post subject: Script request nice Bouncing Balls Demo v0.2
PostPosted: Thu Sep 05, 2019 8:15 am 
User avatar

Joined: Wed May 29, 2019 1:40 am
Posts: 30
hello, can you please, the script for your video with instructions (how many prim must you have) make? thank you in advance! Greetings from salzburg, Tara


Top
 Profile  
 
 Post subject: Re: Script request nice Bouncing Balls Demo v0.2
PostPosted: Thu Sep 05, 2019 10:06 am 
Furious Typer
User avatar

Joined: Fri Mar 26, 2010 12:11 pm
Posts: 240
Location: Belgium / Brussels
Here is the basic script I used in the video.
{L_CODE}:
// Bouncing Ball v0.1 by djphil (CC-BY-NC-SA 4.0)

float buo = 0.5;
float vel = 5.0;

integer power;

bounce(rotation dir)
{
    llSetBuoyancy(buo);
    llSetVelocity(<0.0, 0.0, vel> * dir, FALSE);
}

default
{
    state_entry()
    {
        llCollisionSound("be582e5d-b123-41a2-a150-454c39e961c8", 1.0);
        llSetStatus(STATUS_BLOCK_GRAB_OBJECT, FALSE);
        llSetStatus(STATUS_DIE_AT_EDGE, TRUE);
        llSetBuoyancy(0.0);
    }

    touch_start(integer n)
    {
        llSetStatus(STATUS_PHYSICS, (power = !power));
    }

    land_collision(vector n) {bounce(llDetectedRot(0));}
    collision(integer n) {bounce(llDetectedRot(0));}
    on_rez(integer n) {llResetScript();}
}
The ball bounces on the ground and on objects. If you tilt the objects then the ball will bounce in the orientation of the object on which it bounced.
The Physics Engine is ubODE

Enjoy! :)

_________________
Webmaster @ digitalconcepts.free.fr & digigrids.free.fr


Last edited by dj phil on Sat Oct 12, 2019 10:48 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Script request nice Bouncing Balls Demo v0.2
PostPosted: Thu Sep 05, 2019 10:27 am 
Furious Typer
User avatar

Joined: Fri Mar 26, 2010 12:11 pm
Posts: 240
Location: Belgium / Brussels

_________________
Webmaster @ digitalconcepts.free.fr & digigrids.free.fr


Top
 Profile  
 
 Post subject: Re: Script request nice Bouncing Balls Demo v0.2
PostPosted: Sun Sep 08, 2019 4:54 am 
User avatar

Joined: Wed May 29, 2019 1:40 am
Posts: 30
I love you so much, I love you so much, I love you so much ♥ Thank you Thank you Thank you Thank you !!! hugs Tara from Salzburg


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 4 posts ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
610nm Style by Daniel St. Jules of Gamexe.net