Author Topic: Static Items  (Read 336 times)

How do I make a item rotate on a brick nonstop at a angle, like Bushidos Invinci

To rotate:
Set the rotate member field to true.

To be at an angle:
Rotate the actual model or change the rotation member field on the ItemData datablock.

You would do something like this:

Code: [Select]
package rotateMyItem
{
function yourItemData::onAdd(%this,%obj)
{
%obj.rotate = 1;
return parent::onAdd(%this,%obj);
}
};
activatePackage(rotateMyItem);

You would do something like this:

Code: [Select]
package rotateMyItem
{
function yourItemData::onAdd(%this,%obj)
{
%obj.rotate = 1;
return parent::onAdd(%this,%obj);
}
};
activatePackage(rotateMyItem);
I'm pretty sure you can do this without the package, since the packaged yourItemData::onAdd calls the original yourItemData::onAdd, which doesn't exist so the game just defaults and goes on to call ItemData::onAdd. Could be wrong, though.

I'm pretty sure you can do this without the package, since the packaged yourItemData::onAdd calls the original yourItemData::onAdd, which doesn't exist so the game just defaults and goes on to call ItemData::onAdd. Could be wrong, though.

Not wrong, it would still work without the package.

function yourItemData::onAdd( %this, %obj )
{
     %obj.rotate = true;
     return parent::onAdd( %this, %obj );
}