Message 1 of 5

Not applicable
12-09-2013
06:59 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
--question. How can I add a frame to the bezier controller named "garb" and change value of light multiplyer to 75 when the height value of box becomes 202.9631958008 (b.height = 202.9631958008) over the course of the animation 0 to 100
--I realize I can do it like "at time # animate on d.multiplier = 75" however my question is mainly about how to add keyframes to a bezier controller for my light multiplier value that
--changes the multiplyer value based when a certain condition that is met during the course of an animation namely when box height = 202.9631958008
--later I have to switch out the conditional with something more than just a height change of a box but I am trying to learn basics of adding keyframes to bezier curves based on a condition. The condition of a box determines when my new keyframe is placed with regard to my light. My current script below
--thanks
clearListener() ResetMaxFile #noPrompt units.displayType = #metric units.MetricType = #Kilometers units.systemType = #kilometers units.systemScale = 1 b = box name:"dodo" height:10 pos:[0,100,0]--create box d = omnilight name:"****" rgb:[0,230,89] pos:[0,0,0] multiplier:59 --create light whos multiplyer value changes at time 0 animate on b.height=0 at time 100 animate on b.height=300 at time 0 animate on d.multiplier = 0 at time 100 animate on d.multiplier = 50 d.multiplier.controller = bezier_float name:"garb" --creates a multiplyer bezier curve for curve editor for omnilight displaymulitplyerkeys = d.multiplier.controller.keys addnewkey d.multiplier.controller 64 ---this line adds keyframe along the curve at frame 64 but doesnt dosnt change the multiplyer value and its placement is not based on a condition. So this doesnt answer my question. --if (b.height = 202.9631958008) == true do ---LINE DOES NOT WORK --then --( --d.multiplier = 75 ---LINE DOES NOT WORK --)
Solved! Go to Solution.