Author Topic: Items getting faster  (Read 1409 times)

I wanted to make all my items rotate while on bricks so I made a script object to manage them so I only had one schedule instead of loads but as I add more items the rotation speeds up.

It also says unkown command onRemove when it still does what the command does.

It's a bit big to post so I've attached.

I've noticed this several times when I've used script objects to reduce lag.

If you tell me why I can try and fix it myself.

You have to be kidding me... You're telling me you're scripting item rotation when there is a little checkbox in the item that allows you to set it to rotate?

Your knowledge is patchy.

Ephi is kinda right you know, about you having to be babied.  Nothing personal, but the solution is much easier than you're making it.

Code: [Select]
package rotateItems
{
function ItemData::onAdd(%this,%obj)
{
%obj.rotate = 1;
Parent::onAdd(%this,%obj);
}
};

activatePackage(rotateItems);

I don't just know stuff, you're just expecting me to know what everything does and how to use it and all the technical what-not.

Besides, I had already scripted it and I learnt from it.
« Last Edit: January 12, 2008, 09:49:36 PM by MrPickle »

We expect you to figure it out for yourself. You wouldn't have caught me making this many posts when I was learning torquescript - If i didn't know something i'd just go work at it until i figured it out.

Nobody taught me or Trader how to do things, we just picked it up using intelligence.

As did I. But I used craziness.

I do try to figure things out myself, I look through other scripts, dump stuff, trace etc. Just sometimes I can't figure things out so I need help.

Also I'd like to point out when you tick the checkbox in F11 the item doesn't start to rotate.

It might after someone picks it up.  I dunno.  Just use the code I gave you.

I am, could someone still point out why it's speeding up, for future cases.

Yeah, it's because another rotation cycle is being called (scheduled) before the current change in rotation is applied.

Because it's all happening so quickly, I don't know if there's a way to fix it.  I have a similar issue with my item hover / rotate code.  I have a hackish fix in place, but I may try to come up with a solution later.

I dont know if this really fixed it or not. I sped up the amount in which they rotated to help check if it was overlaying, and it seems to be working, however, I mightve done something wrong.(note I reverted the speed up to the rotation before I posted this.)


Why are you wasting your time with rotation schedules when the game will do it for you?  Move on to something else.

I want to know why the script object is speading up, I used the same thing in something else and it speeded up too.

I know about the rotation and I have it working, thanks.