Forum Groups
  All forums
    Help & Feedback
      Questions
      Work in progress
      Finished Art
      Non-Max related
    Community
      Offtopic
      News
    Hardware
    Photography



Maxunderground news unavailable

PLEASE HELP ME OUT WITH MAX SCRIPT
show user profile  SURBHIT
I am new to max script and am trying to create a scene with a box and a sphere.I want to show that in the beginning,the sphere is revolving in a vertical path.The box is very small,almost invisible at this point of time.Then,gradually,the box starts growing in size and after it crosses a certain limit,the sphere starts revolving in a horizontal path,around the box.I have not taken any reference.Please help.I have used the following script:
mybox=box length:30 width:30 height:30
mybox.name="my box"
orbit1=circle radius:70
orbit1.name="horizontal orbit"
orbit2=circle radius:70
orbit2.name="vertical orbit"
rotate orbit2 (eulerangles 90 0 0)
mysphere=sphere radius:10
mysphere.name="my sphere"
mysphere.pos=[70,0,0]
pd1=pathdeform path:orbit1 axis:1
pd2=pathdeform path:orbit2 axis:1
if mybox.width>=15 then addmodifier mysphere (pd1) else addmodifier mysphere (pd2)
if mybox.width>=15 then move mysphere[0,0,0] else move mysphere[90,0,90]
read 553 times
3/6/2010 9:54:40 PM (last edit: 3/6/2010 9:54:40 PM)
show user profile  Dub.
What seems to be the problem?

Are you getting an error you didn't expect?

If you're doing animation, you might want to look into the "at time" context.

this way you can say things like:

at time 0f (mybox.height = 15)
at time 30f (mybox.height = 30)

You'll get animation when you scrub the timeline then.

Also, if you want to change parents, you probably want to look at scripting up the constraint controller.


read 540 times
3/6/2010 10:03:38 PM (last edit: 3/7/2010 12:44:41 AM)
show user profile  spoon
Regular casing works just as well you know ... (thread title)


read 516 times
3/7/2010 12:10:30 AM (last edit: 3/7/2010 12:10:30 AM)
show user profile  Hua*MuLan~
--max2010
mybox=box length:30 width:30 height:30
mybox.name="my box"
orbit1=circle radius:70
orbit1.name="horizontal orbit"
orbit2=circle radius:70
orbit2.name="vertical orbit"
rotate orbit2 (eulerangles 90 0 0)
mysphere=sphere radius:10
mysphere.name="my sphere"
mysphere.pos=[70,0,0]
mysphere.pos.controller = Position_Script()
mysphere.pos.controller.script = "range = (animationRange.end - animationRange.start).frame\n
u = sliderTime.frame * (1/range)\n
if mybox.length > 15 and mybox.height >15 and mybox.width > 15 then\n\t
position = pathInterp orbit1 1 u\n
else\n\t
position = pathInterp orbit2 1 u\n"
cs = Float_Script()
cs.script = "range = (animationRange.end - animationRange.start).frame\n\t
u = sliderTime.frame * (1/range)\n
u*30\n"
mybox.width.controller = cs
mybox.height.controller = cs
mybox.length.controller = cs
Every day is a new day

MSN:qq343294964@hotmail.com

read 490 times
3/7/2010 10:02:58 AM (last edit: 3/7/2010 10:03:32 AM)
show user profile  Westcoast13
lmao, what is it with the caps?!?!


My Turbosquid Area

read 482 times
3/7/2010 10:25:42 AM (last edit: 3/7/2010 10:25:42 AM)
#Maxforums IRC
Open chat window


Support Maxforums.org