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.
Advertisement