![]() |
Fixed X position but freely moving Y positon? - Printable Version +- 2DWorlds Forums (http://2dworlds.buildism.net/forum) +-- Forum: 2DWorlds (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=4) +--- Forum: Scripting (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=13) +--- Thread: Fixed X position but freely moving Y positon? (/showthread.php?tid=2673) |
Fixed X position but freely moving Y positon? - TylerMcBride - 04-09-2011 I'm trying to make platforms that move straight up. How would I make it so they can't move left or right under any circumstance, but still move up normally? RE: Fixed X position but freely moving Y positon? - Login - 04-09-2011 Are you scripting this? I'd need more detail: How high up? How long do you want it to sit there? What speed? RE: Fixed X position but freely moving Y positon? - TylerMcBride - 04-09-2011 I already have those parts covered. I just need to figure out how to make it so that its X position/velocity STAYS where it is. RE: Fixed X position but freely moving Y positon? - Login - 04-09-2011 Try making x value fixed. It's not "anchored" it's "fixed" Check this out for more info: http://buildism.net/wiki/w/index.php?title=Main_Page Scripting for functions and what-nots. RE: Fixed X position but freely moving Y positon? - TylerMcBride - 04-09-2011 I have no idea how to make the X value fixed. RE: Fixed X position but freely moving Y positon? - Scripter - 04-09-2011 (04-09-2011, 06:54 PM)TylerMcBride Wrote: I have no idea how to make the X value fixed. I'm guessing you are using FixedVelocity, and have a FixedRotation in the brick. [lua] box1.FixedVelocity.Velocity = Vec2D(0, 5) [/lua] Otherwise, if all you want to do is move a Fixed brick up, you would want... [lua] while true do sleep(0.1) box1.Position = box1.Position + Vec2D(0,1) end [/lua] |