rusztamas Posted April 29, 2017 Share Posted April 29, 2017 Hi! I'd like to make an object which is attached to the player, and "floats" above his head, like, up and down, slowly. But i dont know how to make the object return to its previous position. I think i dont need timers and triggers here, just simple lua, but i dont really know the way how to do it. It would look like this: Places object( Moves object up, in 1000ms Moves the object down in 1000ms.) This would be forever. Link to comment
Tails Posted April 29, 2017 Share Posted April 29, 2017 (edited) You can attach objects to players with attachElements Edited April 29, 2017 by Tails Link to comment
Fist Posted April 29, 2017 Share Posted April 29, 2017 You have to use attachElement and moveObject, but you can't do this without timers, there is no other way to tell when object is finished moving. Link to comment
NeXuS™ Posted April 29, 2017 Share Posted April 29, 2017 There is a way to do it without timers, but it's much more simple with them. If you want to, you can do with getTickCount and a while cycle. Link to comment
pa3ck Posted May 5, 2017 Share Posted May 5, 2017 Actually interpolateBetween has 2 recursive easing types, "SineCurve" and "CosineCurve", no need for a loop or timers. 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now