Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Bouncing Script

Papillon Chatnoir
Registered User
Join date: 4 Sep 2004
Posts: 146
05-20-2007 06:52
I'm making a bouncing castle and placed a script to make anyone bounce.
The problem is that it seems to only detect the owner and won't bounce anyone else.

From: someone
//

float force_amount = 9.0;


default
{
collision(integer tnum)
{
llTriggerSound("Boing 1", 0.3);
if (llDetectedType(0) & AGENT)
llPushObject(llDetectedKey(0), force_amount*llRot2Up(llGetRot()), ZERO_VECTOR, FALSE);
}
}


Can anyone help me, what do I need to change so it detects ANYONE??????
_____________________
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
05-20-2007 07:21
From: LSL Wiki
As of version 1.11.1 (1) of Second Life, pushing can be set to "restricted" on a parcel by the land owner. This stops llPushObject from being used upon avatars other than the owner of the script (self-pushing is still allowed). Scripts owned by the land owner can still use llPushObject on any avatar, and pushing of non-avatar objects is unaffected.


Does the land owner have restrictions in force?
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
05-20-2007 07:56
From: Papillon Chatnoir
I'm making a bouncing castle and placed a script to make anyone bounce.
The problem is that it seems to only detect the owner and won't bounce anyone else.



Can anyone help me, what do I need to change so it detects ANYONE??????


As scripted it will only work on the first person in the detected list. Try iterating the list rather than just using 0.

CODE

float force_amount = 9.0;


default
{
collision(integer tnum)
{
while(--tnum >= 0)
{
llTriggerSound("Boing 1", 0.3);
if (llDetectedType(tnum) & AGENT)
llPushObject(llDetectedKey(tnum),force_amount*llRot2Up(llGetRot()), ZERO_VECTOR, FALSE);
}
}
}
_____________________
I'm back......
Papillon Chatnoir
Registered User
Join date: 4 Sep 2004
Posts: 146
05-20-2007 07:57
Duh! :rolleyes:

Yup I checked my friends land is no push, I tried it on mine and it works perfectly now Woohoo!!!!!!!!

ty <3
_____________________