[Include] [INC] Smooth Rotate v2 ***UPDATED: July 10'th, 2009
#1

Smooth Rotate v2
Include by Lavamike
Information
I released the first version as my first script release on these forums. It was epic long. I have re-made it now and I tried to make it as efficient as possible. It won't run the timer when no objects are being rotated.



Functions
This include adds two new functions.

StartRotateObject(objectid); - Starts rotating the objectid.

StopRotateObject(objectid); - Stops rotating the objectid.



Download
UploadFFS: http://files.uploadffs.com/9/1064919d/SRotate2_u1.zip
Pastebin: http://pawn.pastebin.com/f26724298



Installation
Extract SRotate.inc to your pawno\includes\ folder

At the top of your script add: #include <SRotate2>



Notes
I only ask that you don't remove the credits at the top from the script or at least don't go running around showing your friends saying you made it by yourself. You may modify it as much as you want except for that. Feel free to mirror, post a link in this topic and i'll add it. You can also edit it/make it better and post a link here and I will post your edited version here too. Please provide a brief description on your changes. Also, it should work fine with object streamers. When you destroy an object without using StopRotateObject, the script will automatically stop the object from rotating for you. You may have to edit your object streamer to start the rotation of a certain object or something. I'm not sure.



----------------------------------------------------
Smooth Rotate By Lavamike
Friday, July 10, 2009
Version 2.1
----------------------------------------------------


Reply
#2

Nice release, yet again. I remember some time ago I was trying to rotate objects in little tiny bits but it just sucked for me. xD

Thanks again.
Reply
#3

I don't know how much this will lag, so I included a #define, so you can change the timer delay. I really only made a new one for fun but anyone can feel free to try it out or use it. I only ask that you keep the credits commented at the top.
Reply
#4

Things like:

ObjectRotationZ[ObjROT] = ObjectRotationZ[ObjROT] + 1;

Can be further shortened to:

ObjectRotationZ[ObjROT]++;
Reply
#5

Quote:
Originally Posted by Weirdosport
Things like:

ObjectRotationZ[ObjROT] = ObjectRotationZ[ObjROT] + 1;

Can be further shortened to:

ObjectRotationZ[ObjROT]++;
I wasn't sure if it would work properly with arrays as I had only used it on things like the TotalObjectsRotating++;

So I didn't take any chances :P
It's not really a big deal, I don't think it changes performance, does it?


_________________________________________________
_________________________________________________
_________________________________________________


Update, v 2.1: Fixed a major update that could possibly cause the server to crash. Also changed what was mentioned above by Weirdosport



Download
UploadFFS: http://files.uploadffs.com/9/1064919d/SRotate2_u1.zip
Pastebin: http://pawn.pastebin.com/f26724298
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)