Author Topic: On command animation play  (Read 1173 times)

I was messing around with what DarkStar told me about adding animations for movies using mission editor. I want it so when I say /SkyFly my animation plays. Here is the code I put on the top of the Slopes.mis

Code: [Select]
//--- OBJECT WRITE BEGIN ---
datablock StaticShapeData(Name)
{
   category = "Movie";
   shapeFile = "./SkyHawkMovie.dts";
};

function Name:: serverCmdSkyFly(%Client)
{
   %obj.playThread(0,"animation");
}

What sould I add/remove to make it play the animation when I saw /SkyFly

Well, when I use weapons, the animation is named after a state. You might need to create a state to do it. Or a DSQ.

Code: [Select]
function serverCmdSkyFly(%Client)
{
   Name.playThread(0,"animation");
}

What purpose does the "Category" of the static shape have? They don't appear in the brick menu... It also needs a position and rotation. If you create more than one object called "Name", then it won't work, and will not look good if people spam /skyfly /skyfly /skyfly.

Code: [Select]
function serverCmdSkyFly(%Client)
{
   Name.playThread(0,"animation");
}

What purpose does the "Category" of the static shape have? They don't appear in the brick menu... It also needs a position and rotation. If you create more than one object called "Name", then it won't work, and will not look good if people spam /skyfly /skyfly /skyfly.

This is added with mission editor. I added this script to the top of the .mis file for slopes.