(If this has already been mentioned I apologize but I thought I'd bring it to light anyway)
After many attempts to find an alternative to using 3dsmax to create fully rotating objects, similar to those asteriods in MoB and/or the gem in SoZ, I've finally found a rough solution for my 'mage's school planetary orrery' which I plan to use in conjunction with the visual effects editor and placeable.2da for the last part of my Nihil Mod Trilogy.
The Basic Requirements are rather simple:
(1) First copy and save this script to your module
(2) Place this script onto the 'onHeartbeat' script section on a placeable you want rotating.
(3) (Crucial) Make sure the placeable's 'Static' variable is set to 'FALSE'
(4) Load up the module and watch the placeable slowly spin in space.
Uses:
Excellent for other-worldy locations and dreamscapes. Examples include, but not limited to, rotating spheres, houses, rocks, statues, gears, weapons etc.
Special Notes:
It is still a bit rough, but hopefully it helps all those out there who want placeables to rotate in space without having to resort to 3dsMax's obscure animation logic to do so. Note that to speed it up or slow it down you may have to get/set some local variables to keep track of it or set down the 360 to something like 90, but testing and adaptations will be needed no matter what path you take.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "ginc_reflection"
//Important Requirements:
//
//Placeable must be set to non-static. It will not work otherwise, so make sure that 'Static' flag is set to false on the object.
//Must be placed on the object's onHeartbeat section, replacing anything there previously.
//
//Note: the more you add to the iNumInterpolationPoints value the smoother the transition, but boosting this
//too much may hurt performance.
void main()
{
object oSelf = OBJECT_SELF;
//Uses the 'ginc_reflection' script that already exists in the game
//InterpolatedRotation(float fRotationDegrees, float fInterpolationTime, int iNumInterpolationPoints, object //oTarget=OBJECT_SELF);
InterpolatedRotation(360.0f, 6.0f, 720, oSelf);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Modifié par seraphimsage, 04 mars 2012 - 08:10 .





Retour en haut






