|
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
|
02-20-2009 14:44
One of my clients approached me with an intriguing question. "What sort of pose ball or scripted gadget could be used to guide a resident so they appear to walk a predetermined path that has to turn at several points between stops? Preferably with planned stops along the way, to watch presentations or to see certain sights?"
My initial thought was one could adapt a vehicle script, or maybe the script from a sit elevator. I have worked with purchased bus systems that were scripted to allow waypoints along a route, and programmed stops, starts and changes in speed. It could either accept coordinates from a notecard or be programmed by the owner moving it manually between waypoints and using a command to record position and orientation at each waypoint.
But how could you make it look like the person is actually walking along a path, and not gliding in a straight line, doing a "walking" animation while facing a random direction? And if not using a vehicle script, how can you get it so the walking person follows the terrain and moves approptiately over prim bridges? Would it have to be a Physical vehicle to do that?
Let's say for the sake of argument that you need at least 6 stops along the route, with the person "walking" on sidewalks that branch and turn between buildings. Between any two stops it is likely to require at least two or more "waypoints" where the direction of travel and slope might change. The land is generally flat, but has a gentle slope in some areas, and the path may take the person over prim bridges that will arch over a stream, or other barriers. It would only have to operate in a single sim, but if it could work on a multi-sim route like the bus that I worked with, that would be fantastic.
I am guessing that an invisible 1-person vehicle, which triggers a walking animation instead of a seated animation when being ridden, and that is pre-programmed via a notecard to move on its own between certain waypoints and turn in certain ways, is what would be needed. But the only vehicle scripts I have made myself are simple boats, driven by the piot of the vehicle. I've never seen the code for a vehicle script that follows waypoints.
Alternatively I was thinking I might use a modified non-physical sit elevator script, replacing the "waiting" animation with a "walking" animation, and slowing down travel speed to a walking pace. If I go that route, I guess every change of facing or direction or slope of travel would need a waypoint programmed.
Any ideas on how best to do this?
_____________________
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.
|
|
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
|
02-20-2009 15:14
Sorry, I'm not feeling well enough to post a detailed explanation, but hopefully this will make sense as a starting point?
I have seen scripted attachments that use llMoveToTarget() with low enough tau values to cause the avatar to actually walk a path between waypoints. Fortunately, this method will also cause the avatar to turn in the direction of movement, so long as the distance between waypoints is long enough to allow the turn.
.
|
|
Viktoria Dovgal
…
Join date: 29 Jul 2007
Posts: 3,593
|
02-20-2009 15:43
From: Ceera Murakami But how could you make it look like the person is actually walking along a path, and not gliding in a straight line, doing a "walking" animation while facing a random direction? If you use something like llMoveToTarget or llApplyImpulse inside an attachment, and don't go too wild with the time/force values, the avatar will walk along in that direction. That's pretty much what leash scripts do. If the gadget has to be something that is sat on, you could just fake it, time the prim movement to be close to walking and play a walk animation. This one's probably going to give you the silly glide, though :/
|
|
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
|
02-20-2009 16:17
Hadn't thought of looking at how a leash script works! I have a few open source examples I could check for that. Will wait for some other suggestions and see what I may be able to come up with this weekend.
Thanks to all for the replies!
_____________________
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.
|
|
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
|
02-20-2009 16:22
From: Ceera Murakami Hadn't thought of looking at how a leash script works! I have a few open source examples I could check for that. You might find this thread helpful in understanding how leashes work.. I certainly did. /54/bb/41925/1.html
|
|
Destiny Niles
Registered User
Join date: 23 Aug 2006
Posts: 949
|
02-20-2009 17:34
JonyBlade Codesmith have a very fine touring system for vehicles and walking. His price is reasonable and very well done http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=492
|
|
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
|
02-21-2009 13:11
Humm, I saw bicycles and all manner of vehicles in his listing, but not walking. Still, I passed that information on to my client. Thank you!
_____________________
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.
|