Frames
-
I was wondering: Is it possible to have a random movement in frames? It's just that I've made a frame powered aircraft (the first on the warehouse) and i was wondering if it's possible instead of having programmed functions like a bit left a bit right etc it could be random. also, can someone explain the script? i can put it in and change the moving values, but don't want to touch anything just in case. can someone help please?
-
'rand' generates a random value bigger than 0 and smaller than 1. It'll refresh every frame, but there's no way at the moment to stop this; if it's too fast, I guess you could decrease the joint's accel, but there's not that much you can do from within the script. I'm not sure what you mean by 'explain the script'... can you go into more detail?
-
What i mean is: I've learnt this code: [0,1,0,1][(frame/50)%5]
however the only bit i know about is the [0,1,0,1] bit,omeone xplain what the other bits do? -
Have a look at this thread, I posted a pretty thorough guide:
http://www.sketchucation.com/forums/scf/viewtopic.php?f=61&t=17539&start=0 -
ok i understand the 50 bit now, but i don't have a clue about th %5 bit, please help!
-
%5 means "Modulo 5" in math terms:
http://en.wikipedia.org/wiki/Modulo_operationIn this case it makes sure that frame/50 is never more that 5. Once it reaches 5 it will start at 0 again.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement