Hello everyone,
I'm new to working with physical objects and I've spent the weekend writing a script to make a party balloon bob up and down. It works great - right up until an avatar collides with the balloon. I wrote a collision event to put the balloon back in it's initial position and rotation, but the script doesn't call that event for some reason that I can't fathom.
After an av runs into the balloon, it bounces around wildly for a while (I have them contained in my workshop) but continues to bob as commanded by the loop ignoring the collision all together.
The setup of the script is like this:
global variables:
pos
rot
balloon()
do
SetHoverHeight command with llFrand calculation to make it bob - this works fine
while
default
state_entry
sets physics to true
puts balloon at initial hover height
sets buoyancy
//I tried putting in llCollisionFilter("", NULL_KEY, FALSE) in the state_entry event, but that didn't make a difference.
touch event
takes current position and rotation - it will tell me these coordinates in chat
calls balloon()
collision event
commands llSetPos and llSetRot to return the balloon to the coordinates taken in the touch event
calls balloon()
A command to chat "I've been hit" in the collision event doesn't happen, though if I walk into the object before it's been touched, chat tells me that the event was called, but the pos and rot variables are empty so the object still floats around.
Is there something I need to add to the loop to have it recognize a collision?
Thanks for any help you can provide.

