Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

A river with current? Help!

Sra Echegaray
Registered User
Join date: 18 Nov 2005
Posts: 11
11-07-2007 07:36
I have built a river on my property that flows from the top of the sim down to the ocean. Half of this is in a steep canyon with narrow walls. Visually, it all looks cool (close-up at least - damned distance constraints on scuplties!).

What I want, though is to be able to push objects, including avatars, down the river. That is, I'm trying to simulate current. I have future plans for this, but it's gotta work on its own first.

My first try was to create physical balls and shoot them down the canyon. Theoretically, these would push anything they bump into. What I found was that, in order for them to be small enough to fit in the canyon, they were too small to consistently - or even effectively if sporadically - do their job. Sometime they'd lose all momentum by hitting the walls before reaching their termination point, other times, they'd bounce right out of the river water and over the surface for several meters. In general, this just didn't work.

My next idea was to add a full sized box prim with the llVolumeDetect set to detect and take action on anything entering the box. Theoretically, according to the wikis, so long as the script is in the root prim, when ever something enters the object, the collision_start will be triggered and I can use llPushObject. This works about.... maybe a tenth of the time. I can walk into the 10x10 object and nothing happens, or maybe I get tossed way downstream. I can drop from the sky into the object and, again, something MIGHT happen, but as likely not.

So, my next trial has been to create a wall of force sort of thing. This time, I create a small square 10x10x.5. Using a timer and llSetpos, I move the box along the local y a half a meter at a time. All the while, llVolumeDetect is active and waiting to detect a collision. With me standing right in its path, this option worked exactly once with two separate pushes. I've got llOwnerSay set to tell me for now when it detects something in case other parts of the push weren't written right. But, so far, i can't get the thing to even register that there's been a collision. I've tried including a collision_end as well as the regular collision event combined with no volume detect and no phantom status.

Now, I could understand if part of the problem with Idea #2 is that the large detection box part of the linked set isn't the root. But I'm at a total loss as to why Idea #3 doesn't work. I know llSetPos sleeps the script, but does that sleep interfere with the llVolumeDetect? If there's something interpenetrating the object when it lands, does this not trigger the detect event? If an object or Av is completely engulfed by the detection object, does it ever trigger a collision event?

What gives??

Codes included as text files.
Twisted Pharaoh
if ("hello") {"hey hey";}
Join date: 24 Mar 2007
Posts: 315
11-07-2007 07:44
Why don't you try something like the "pounce" gadget? Or I have seen sliders in SL you could make an invisible slider that would throw the avatars in the water.
Malachi Petunia
Gentle Miscreant
Join date: 21 Sep 2003
Posts: 3,414
11-07-2007 07:57
Or look at the Linden inner-toob ride in Tethys for ideas (I think it is still there). The tube is a vehicle which listens to "impellers" in the water.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
11-07-2007 12:24
llSetPos is non-physical movement. The object doesn't 'move' 'from' point A 'to' point B, it instantaneously disappears from point A and re-appears at point B. or something like that... basically, it never intersected your av, it just appeared around you. I've had that mess up collisions for me as well.

Try making it physical (can you have a physical llVolumeDetected object?), and moving it slowly with a Move2Target. That makes it really 'move', and you may have better luck detecting the collisions that way.

Or lay down prims on the river floor, those will detect the avs as they walk on them. This gets heavy, IIRC you get lots of collision events when someone walks on you. Reducing the minimum event time would be useful here, it'll help the sim and keep your effects looking smoother.
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
11-07-2007 13:21
Take a look at how some of the water-slides are made in-world. They use a pose ball that moves the avatar through a set path.
_____________________
Sorry, LL won't let me tell you where I sell my textures and where I offer my services as a sim builder. Ask me in-world.
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
11-07-2007 15:58
I'd be tempted to try and use llPushObject together with a volume detect. Instead of having the volume detect doing the push work employ a minion prim to slave away. erm, I mean, a small phantom prim moves to the location of the avatar and applies a gentle push and continues to do so until the avatar (or even physical object) has cleared the volume detect. My reasoning for the moving phantom pushers come from trying to make springboards and finding the push drop-off to be inconsistent so I ended up having the prim move itself to the avatars centre then apply the push, knowing that exactly the correct amount would be applied (which makes for pushing an avatar from one platform to another reasonably accurate).

EDIT: Springboard discussion including my script: /54/06/172415/1.html
_____________________
www.nandnerd.info
http://ordinalmalaprop.com/forum - Ordinal Malaprop's Scripting Forum
Nectere Niven
Gadget Junky
Join date: 12 Jan 2007
Posts: 211
11-07-2007 19:30
You know who you might look into, sorry I cant be of more assistance, is Heather Goodliffe who does the surfable waves, the waves push the user towards the beach.
Sra Echegaray
Registered User
Join date: 18 Nov 2005
Posts: 11
11-07-2007 20:36
From: Twisted Pharaoh
Why don't you try something like the "pounce" gadget? Or I have seen sliders in SL you could make an invisible slider that would throw the avatars in the water.


From: Malachi Petunia
Or look at the Linden inner-toob ride in Tethys for ideas (I think it is still there). The tube is a vehicle which listens to "impellers" in the water.


My object is to make so that if you should go into the river, by falling, flying or intentionally walking, you will be whisked away, rather like a real river. All of the sliders I've seen are built around sit animation overrides and unsit. These require the Av to intentionally choose to be acted upon. I want the river to just push... anything... down to the sea.

The same for inner tubes and other vehicle-type ideas. Though I may add vehicle functions later, I want there to be a difference between a controlled trip down river and being washed downstream because you ignored the warnings of a strong current.
Sra Echegaray
Registered User
Join date: 18 Nov 2005
Posts: 11
11-07-2007 20:43
From: Ziggy Puff
llSetPos is non-physical movement. The object doesn't 'move' 'from' point A 'to' point B, it instantaneously disappears from point A and re-appears at point B. or something like that... basically, it never intersected your av, it just appeared around you. I've had that mess up collisions for me as well.


Well, okay. But. If the box suddenly appears on me, around me, etc. shouldn't it trigger a volumeDetect once it's in place again? That gets back to my question on whether a trigger works when you're all the way inside a detection box and not breaking any of the surfaces.

From: someone
Try making it physical (can you have a physical llVolumeDetected object?), and moving it slowly with a Move2Target. That makes it really 'move', and you may have better luck detecting the collisions that way.


You can't make an object physical when it intersects anything else. It would be pretty close to impossible to create a shape that could stay perfectly within the confines of the canyon without touching the walls or the floor. And, the last I checked, you're not supposed to use VolumeDetect on physical objects.

From: someone
Or lay down prims on the river floor, those will detect the avs as they walk on them. This gets heavy, IIRC you get lots of collision events when someone walks on you. Reducing the minimum event time would be useful here, it'll help the sim and keep your effects looking smoother.


That might work, though it won't whisk someone downstream if they're hovering in the water but not touching the floor of the river.
Sra Echegaray
Registered User
Join date: 18 Nov 2005
Posts: 11
11-07-2007 20:52
From: nand Nerd
...
EDIT: Springboard discussion including my script: /54/06/172415/1.html


Thanks nand. I think this might help - if VolumeDetect were a bit more reliable. But, I'll try it. It sounds like it's more or less along the lines of what I'm trying to do.

(You weren't by chance involved in the Giant Snail races, were you? The setup you describe in this thread remind me of it.)
Twisted Pharaoh
if ("hello") {"hey hey";}
Join date: 24 Mar 2007
Posts: 315
11-07-2007 22:07
Yeah well then the closest thing I can think about is this cage that I've seen once on a sandbox. It's a griefing weapon so i'm not sure it is very ethical.
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
11-07-2007 23:31
Keep in mind that many people use flight assist scripts that have a built in movelock. In such a case they will not be swept away at all while hovering. No matter how much they touch or collide with push script prims.
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
11-08-2007 00:59
From: Sra Echegaray
Thanks nand. I think this might help - if VolumeDetect were a bit more reliable. But, I'll try it. It sounds like it's more or less along the lines of what I'm trying to do.

I've never had any problems with VolumeDetect being unreliable myself. I'd give this a go if I had the time to spare but unfortunately don't. A nice river might be a good addition to my land.

From: Sra Echegaray

(You weren't by chance involved in the Giant Snail races, were you? The setup you describe in this thread remind me of it.)

Nope, 'fraid not. I know the one of which you're referring but only ever seen photos of it, never got around to visiting. (RacerX Gullwing comes to mind as being the creator, though I could be mistaken).
_____________________
www.nandnerd.info
http://ordinalmalaprop.com/forum - Ordinal Malaprop's Scripting Forum
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
11-08-2007 11:15
Well, what if....

Suppose you had a trolley car or elevator script that ran down the bed of the river. Wouldn't it bump any avatar it encountered along in front of it? if the shape of the car was right, and the river deep, it might sort of scoop the avatar along.

Step two. make the trolley car invisible.

Step C, Detect an avatar in the river, and then rez the invisible trolley car just upstream to push it down the stream.

just babbling, never did this.