Constant Object Rotation
#1

Hello Everyone,

I'm planning on making an object that rotates abouts its axis constantly for ever, I need this object to finish my parkour map. It will be a circle or square object(any) and I want it to rotate about its axis in a slow and constant speed forever. Any kind of help will be highly appreciated.

Thanks,


~SShady.
Reply
#2

try this Include https://sampforum.blast.hk/showthread.php?tid=151452
Reply
#3

Quote:
Originally Posted by AliDollar
Посмотреть сообщение
I wasn't born yesterday, thanks for trying though. I want it without includes please. There are some functions that do it but unfortunately I cannot find any good documentation on it.
Reply
#4

You do realize giving you an include that does it is same as copy pasting a function that does it right?
you probably don't
here is a tip, move object rotates objects smoothly if you include some little movement in it too, if you want something to happen over and over again, timers.
there you go, you can build it yourself with those 2 tips in mind..
Reply
#5

You have to move the object that should rotate (0.001 is enough). You can move it up (and also specify rotations) and then down again, and so on. The speed can be calculated from the distance it moves (m/s) - if the speed is the same as the distance, it takes 1 second to complete.

Use the callback OnObjectMoved for it to be smooth and this way you dont even need a timer. Use a variable to identify the position it's at (the state basically) to decide if it should move up or down.

You could've taken a look at the include above too - you don't have to use it, you can read it and figure out what to do. There's also a script in the samp server package that shows steady object rotations.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)