Jump to content

Walkable object


Raena Parx
 Share

You are about to reply to a thread that has been inactive for 2207 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I am a builder, not a scripter, so I'm hoping someone can answer this in a "scripting for dummies" reply lol. 

I'm interested in making an object that can be rezzed, then when sat on it lets you walk and moves with you, while using an animation on your avatar -- one for walking, one for standing.   For example if I had a basket on the ground, I could sit on the basket an it would animate the object as if I'm wearing it in my arms, then let me walk freely with it, or stand.  That's just an example.

I figure I would need to...
1. on sit: make the object move to a specific position in relation to my avatar
2. animate my avatar (depending on walking or standing)
3. make my object free to move with me, even tho I sat on it.....***THIS IS WHERE I have no clue how to do.

Any suggestions?

Thank you in advance.

Link to comment
Share on other sites

You were doing fine until you got to sitting on the basket, which doesn't serve any purpose in the scenario you are describing.  What you seem to want to to is:

1. Click on the basket, which makes it

2. attach to your avatar and

3. start an animation.

All of that is quite easy. The only hidden step is that in order to attach, you have to have the basket request permission to attach to you and then prepare to animate you. That means that your touch_start event has to include a llRequestPermissions statement, which in turn triggers the run_time_permissions event where you llAttachToAvatar.  Then, in step 2, the attach event is where you trigger the animation with llStartAnimation

It's at this point that I need to ask why you need to trigger a walking or standing animation.  After all, you are carrying the basket, so why not just walk or stand as you normally would? I don't truly see why you need step 3. (Incidentally, if you really do want to trigger a walking animation, remember that all that does is make your avatar go through the motions of walking.  The animation can't actually make you walk.  You still need to do that part yourself.)

Link to comment
Share on other sites

Thank you for the help.  lol I guess my "basket" example was probably not very clear.  Ok...so here is a better example of what I'm trying to do...

Example: I have a lawn mower sitting in the yard.  I want to click on it (to sit) and be able to push it.  When I push it I want to actually walk with the lawnmower (along with the animation that I'm holding the lawnmower handles in my hands [walking animation]), then when I stop I'd still be standing with the lawnmower in my hands [standing animation] until I unsit.  Then the lawnmower would be left where ever I unsit from it.  So I literally take it with me. Does that make more sense?

Link to comment
Share on other sites

Yes it does.  I tried exactly that project myself just recently and failed. You'd need custom animations for the stand and walk (which I do not have, hence my own failure). So, to make it work, you'd still follow the plan that I outlined earlier, but step 3 gets more complicated. The animation that you start when the mower is attached will be your "stand" animation.  At that point, I would change states and start a fast timer in the new state, treating it the same way that I would if I were scripting any other AO.  That is, at each click of the timer, check llGetAgentInfo to check AGENT_WALKING. If you detect a change, stop one anim and start the other.

Be sure that back in step 1 you request permission for both PERMISSION_ATTACH|PERMISSION_TRIGGER_ANIMATION, since you will need both.

Link to comment
Share on other sites

In that case, I would make your lawnmower a vehicle (a sled, in fact).   Then you can sit on the vehicle to drive it.   Have an invisible root prim which plays a stand animation when you sit on it and a walking animation when the lawnmower is moving.    

As Rolig says, you will need custom animations, so you are holding the handle of the lawnmower when you drive it.    You also need to ensure that the vehicle moves at 3.2 metres/second (default waking speed), assuming your custom walk animation uses that as its own walking speed (otherwise the avatar will look as if it's sliding and slipping). See http://wiki.secondlife.com/wiki/Voluntary_Movement_Speeds  for more info.

 

Edited by Innula Zenovka
Link to comment
Share on other sites

I've made a similar item awhile back that was a floor buffer haha. I just used an in-game animation creator tool I got off marketplace that'll let you pose a mannequin and download a .bvh  file and upload into Second Life.  Making a vehicle / sit to walk script is not the easiest solution your best bet would be to TempAttach it as Rolig suggested. The animation would become a lot easier since you'd just have to pose the top half and left the default walking animation control the legs. If you want I could send you the animation I made awhile back.. It won't be pretty but it works.

Link to comment
Share on other sites

29 minutes ago, Love Zhaoying said:

Sounds much easier to attach it, have attachment trigger (appropriate priority) animation overrides, and just walk around with it. That way, it works even if you can’t Rez it - just attach from inventory and off you go!

Yes, but the OP wants to leave the object out on the lawn when you've finished cutting the grass so that's not going to work too well.

Link to comment
Share on other sites

There's actually a third way that is somewhere between my suggestion of just using a straightforward attachment, on the one hand, and Innua's suggestion of using a vehicle. You can put a control event in your script and use the arrow keys on your keyboard to move around. The advantage there is that you don't need to run a fast timer to check AGENT_WALKING. You simply activate the walking anim whenever the forward arrow is held down, and switch to the standing anim when it isn't.  That's the approach I used in 

You still need to have two custom anims, designed to hold onto your mower and look reasonable while you are walking/standing, but that method is actually quite easy to implement.  The script goes into the mover, activated when you "sit".

 

Edited by Rolig Loon
Link to comment
Share on other sites

54 minutes ago, Scaler Rexen said:

I've made a similar item awhile back that was a floor buffer haha. I just used an in-game animation creator tool I got off marketplace that'll let you pose a mannequin and download a .bvh  file and upload into Second Life.  Making a vehicle / sit to walk script is not the easiest solution your best bet would be to TempAttach it as Rolig suggested. The animation would become a lot easier since you'd just have to pose the top half and left the default walking animation control the legs. If you want I could send you the animation I made awhile back.. It won't be pretty but it works.

Come to think of it, I'm pretty sure you could simply create an animation to position the arms (and which doesn't affect the legs at all) with a higher priority than the default walking anim and then play that on top of the default walk anim when you're pushing the floor buffer/lawnmower.

Link to comment
Share on other sites

2 minutes ago, Innula Zenovka said:

Come to think of it, I'm pretty sure you could simply create an animation to position the arms (and which doesn't affect the legs at all) with a higher priority than the default walking anim and then play that on top of the default walk anim when you're pushing the floor buffer/lawnmower.

That's a good possibility too -- just like the simple anims you'd put into a pocketbook or a pet that you carry around in your arms.

Link to comment
Share on other sites

1 minute ago, Rolig Loon said:

The advantage there is that you don't need to run a fast timer to check AGENT_WALKING.

While I like your idea (in fact, I've used it in my own builds in the past) I don't think this is a particular consideration with a vehicle because you can start and stop the animations in the control event, when the user presses or releases buttons, at the same time you start or stop the vehicle.    But I agree, I think this is probably the best way to do it.

Link to comment
Share on other sites

4 minutes ago, Innula Zenovka said:

Come to think of it, I'm pretty sure you could simply create an animation to position the arms (and which doesn't affect the legs at all) with a higher priority than the default walking anim and then play that on top of the default walk anim when you're pushing the floor buffer/lawnmower.

Part of what I was suggesting. Just didn’t spell it out. ?

Edited by Love Zhaoying
Link to comment
Share on other sites

1 minute ago, Innula Zenovka said:

While I like your idea (in fact, I've used it in my own builds in the past) I don't think this is a particular consideration with a vehicle

Oh, I agree. I was comparing not to a vehicle but to the option of scripting an AO to do the job, which was the first option.  Either your method or mine would trigger the anims in a control event rather than in a timer.

Link to comment
Share on other sites

2 hours ago, Innula Zenovka said:

Come to think of it, I'm pretty sure you could simply create an animation to position the arms (and which doesn't affect the legs at all) with a higher priority than the default walking anim and then play that on top of the default walk anim when you're pushing the floor buffer/lawnmower.

Yeah that's what I was saying I just positioned the torso putting that on priority 4 and leaving the legs to continue their default walking animation so it works but it's not the most beautiful animation..

Link to comment
Share on other sites

Wow!  Thank you everyone for all the suggestions. I really appreciate it.

I can build the animations no problem.  Figured I would only pose the upper body from torso up and let the lower body work freely so avatar can walk. Am trying not to have to transfer ao's, animations, etc. to the sitter because I'd like it to be available for public use (all avatars). 

So if I make the object takeable/attachable/droppable, sl would leave the object where I unsit, right?  That's what I'm looking for.  My question is, how to make the item takeable/attachable/droppable.  Is it all done with scripting, or is there some prim setting required also?

Again I'm not a scripter.  Should I hire a scripter to do some custom work, or is there some free scripts that do this?  I have looked, but have been unable to find anything like it.   Or is there a link anyone knows of where I can read up on how to do this?

Thank you all again for all your help!!!!!

:D

 

Link to comment
Share on other sites

It's all scripting. While you could piece things together from pre-existing scripts, it's probably smart to do it from scratch so that the script is matched to your application and doesn't have unwanted garbage from an earlier life.  You can advertise in the InWorld Employment forum to attract a scripter.  A small job like this shouldn't be very expensive or difficult.

Link to comment
Share on other sites

42 minutes ago, Raena Parx said:

  My question is, how to make the item takeable/attachable/droppable.  Is it all done with scripting, or is there some prim setting required also?

If you want to have an attached item that you can then drop when you've finished cutting the grass, you'll need to make it out of prims and/or sculpties.  You can't drop mesh items, as far as I know.   Otherwise it's simply a question of land permissions -- whether or not you can rez items on the land.   

Link to comment
Share on other sites

1 hour ago, Innula Zenovka said:

If you want to have an attached item that you can then drop when you've finished cutting the grass, you'll need to make it out of prims and/or sculpties.  You can't drop mesh items, as far as I know.   Otherwise it's simply a question of land permissions -- whether or not you can rez items on the land.   

I had a thought, to get around land permissions could “take copy”/attach/keep.

Link to comment
Share on other sites

Here I am, late to the party as usual... <-<; but with information of relevance at least, if not immediate practical worth... >->;

I've used a pram (baby stroller) before that worked like the OP is describing; my baby sister sat in it, which put her in the pram, then I clicked to "sit", which put me behind it in a holding and pushing position, allowing my regular walking animation to play as I pushed her about in it. Then when the stroll was over, we both unsat and simply left the pram parked in its spot.

What it boiled down to was a rezzed vehicle with two "seats", a sitting animation for the baby, and an upper body, high-priority animation for the caretaker. The "seat" for the person pushing it was, as mentioned above, an invisible platform attached to the visible perambulator.

I'm very short compared to most of the people I know, so naturally I was walking above the ground, but meh, it happens. That's what imagination is for, ignoring the inconsistencies. Anyway, for something a person wishes to leave rezzed out for others to use, and push around while walking, this seems to be what's worked for others in the past.

And from what I could tell by examing the pram (it was no mod, but I'm intuitive about some things) it was extremely simple, too. The stroller was the visible object, and each seat was an invisible linked prim with the sit target set to put sitters in the right position, and I'm sure the script itself was extremely simple, possibly just asking permissions and playing the animations.

Edited by Berksey
  • Like 2
Link to comment
Share on other sites

3 minutes ago, Berksey said:

Here I am, late to the party as usual... <-<; but with information of relevance at least, if not immediate practical worth... >->;

I've used a pram (baby stroller) before that worked like the OP is describing; my baby sister sat in it, which put her in the pram, then I clicked to "sit", which put me behind it in a holding and pushing position, allowing my regular walking animation to play as I pushed her about in it. Then when the stroll was over, we both unsat and simply left the pram parked in its spot.

What it boiled down to was a rezzed vehicle with two "seats", a sitting animation for the baby, and an upper body, high-priority animation for the caretaker. The "seat" for the person pushing it was, as mentioned above, an invisible platform attached to the visible perambulator.

I'm very short compared to most of the people I know, so naturally I was walking above the ground, but meh, it happens. That's what imagination is for, ignoring the inconsistencies. Anyway, for something a person wishes to leave rezzed out for others to use, and push around while walking, this seems to be what's worked for others in the past.

So yours was a vehicle, and supplied it’s own walking animations.

Link to comment
Share on other sites

6 minutes ago, Love Zhaoying said:

So yours was a vehicle, and supplied it’s own walking animations.

A sitting anim for the baby, and an upper-body pose for the "pusher about", me, which didn't affect the walking animation I was already using.

Edit: in fact, I'm not sure it even had its own sit for the baby, it might have just used the cross-legged system ground sit... It was a while back, and it wasn't my stroller, so I can't exactly check and see... But yeah, something like that.

Edit again: Mind you, tho I was technically "sat" upon it, while "pushing" it (really riding on it) I was animated as if walking... it might have had a custom animation for all I know that was a walk.

Edited by Berksey
  • Like 1
Link to comment
Share on other sites

1 minute ago, Berksey said:

A sitting anim for the baby, and an upper-body pose for the "pusher about", me, which didn't affect the walking animation I was already using.

Hmm..but since you were technically sitting, the “walk animation” would have to be triggered by the pram script. I’ve done similar by interfacing to my AO. Then, you’ve a separate override anim for grasping the pram handle. Sound right?

Link to comment
Share on other sites

Yeah, I just thought of that myself... I think it was a walking anim. I realize it couldn't have played two anims at once, unless it put the first on (at high priority) and then started and stopped the walk without stopping the holding until unsat... might be how it worked.

Edited by Berksey
On forums, we punctuate. <-<;
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2207 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...