Jump to content

Animations in a Vehicle


Guest
 Share

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

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

Recommended Posts

Hi folks,

Looking for some advice, as I am a bit of a scripting dunce. I'm making a vehicle in which the avatars walk... for which I'm using a vehicle script and npose. I followed some in-world advice about how to set the animations to trigger to walk and stop, which is working out great.

However, I'd heard at some point that you can also set animations for left/right turn to trigger for driver and slaves, using the key words 'left' 'right' in the notecard titles and animations. I can't for the life of me get this to work though!

If anybody has done similar, or just generally knows how that would work, your advice would be greatly appreciated :)

(Or indeed, let me know if I've completely misheard and this isn't doable.. lol)

Swith ;)

Link to comment
Share on other sites

  • 9 months later...

Really a necro post, right. But I figure someone might come accross this searching (as I did) so figure I might as well post something here.


npose? I will address how to use the wiki to help find code, with a quick intro to LSL's flow.

Intro.

LSL is even driven. An event happens and it waits for these events. YOU decide, by typing in an event section, what events it will watch out for. When something happens it does something, it reacts to the event. So, you first need to have to find the event you want within the script. BUT, not so fast...LSL also has states! You may have different states, which are almost like entirely different scripts in one thing.

They are like states of mind almost! Like angry state of mind is for a different purpose over a loving state of mind. Not that they oppose each other, though they can. So, look to make sure what state your script is in when you are able to push buttons and cause something to happen. What even would that be? Control event! http://wiki.secondlife.com/wiki/Category:LSL_Events < Here is a list of events in LSL, just click on the one you want. This link itself is findable on the main wiki page, under the heading LSL you will see links to funcitons, events and so on. These are all parts of programming languages, when you learn LSL you will learn fundemental things that may help you understand other programming languages! Not all, but some, share the same philisophy or paradigms though but many things are similar. The book "The art of programming" goes as far as to use a psuedo code to teach with, so you can learn programming without actually learning a "real" code! The fundementals are math and science based sometimes, anyway onto something useful.

Control event handles keypresses, LSL allows you to press only certain keys to get reactions and you decalre these. The names of them are very easy to understand. You find two left keys though...how can that be? Well, when you use mouselook or press shift and turn you get a different turn input than a simple left arrow or right arrow key. Oh, the arrow keys are also mirrored with alphabet keys, some don't have arrow keys on thier keyboards so this is to help with that. Same for Pageup and Pagedown, you can use asde etc. for those keys, if you are  user. Anyway, if you don't want to use mouslook or can't for some reason, then you can use shift and arrow key. So, find out which one is triggering the turn.

Now, you need to learn about animations. This will be also available in the wiki, triggering animations requires a function and also taking permissions. I bet this is already done in teh script you speak of. Either way, you must add code to the control events section (indicated between {} marks, these are used to indicate code belonging to the funciton or event mentioned just before tha { and YES they are all over the place. You need to track these down and try to keep them organized, tutorials on all this is beyond this quick post here but may not be an issue and may be common sense after looking how they are layed out) so basically find the turn event handling functions. Hey, now you trigger something. You may be done now!

Something not working? Congrats, you are now a programmer! YAY, something doesn't work and you try again to find out what you are missing and basically repeat the process and maybe even come back here with some more questions nd some code snippet to show us! someone may help, you learn. Maybe you learn from the wiki OR go cram at the in world schools. Hey, even thier Groups may help! You will learn LSL's flow, how triggering animations works and what happens when you trigger two one after the other, you learn about animations and priorities and such. You know may even think or dream up new and exciting features. Maybe they work, you get a better product out of it, you look at the list of functions in LSL and see new stuff indicated with little new thingies and your mind throws ideas, fixes and you are now a scripted. Maybe not a great one, but you know how to sit down and make something work, add a feature or make a script from scratch that does something at least, and it works....I mean, after it fails. Failing happens, and it is ok and maybe it even brings about a few neat ideas or you learn something. Maybe you invent new phrases of insult and scream at the PC, tear your hair a bit or wonder why you bothered. But one day, maybe one day you will click something and smile again. YOU made that, and it works! It is programming, there are a world of opportunities for the free who know how to programm. Freedom and code may just save or destroy the world one day, but most likely you will get angry at your automatic whatsit in real life and figure that you could have programmed it better and see a bug in a programm and laugh "I would have..." and you maybe throw out some jargon at your friends "Yeah, they figure the variables are worth putting into a class so the handlers can error check the lossy BIOS fragments. Yup, standard stuff really." and stuff like that. BTW, I know the phrase before means nothing much...I don't think. Hhhm. Yeah, this is the beginning of a journey! The start of a internal revolution and the world will not look the same. DNA is code, trees are programs and the whole world may crash....but it may not or maybe it already has! You can eventually call yourself a programmer, HTML5 offers new opportunities and has a few events and all that jazz to! Yeah, you can take a peak at web code on pages, maybe some javascript here and a HMTL5 game there and you will be able to call yourself a programming enthusiast. Armchair run the next world changing opereting system and impress your grandma.

wiki.secondlife.com can help with learning about functions and 'events' that trigger things in SL.

Here is something more specific to look into:

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3351 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...