P19~PIディレクトリを作ってみよう③

音はこのようになっています。

PluginHeader{
 RailSimVersion = 2.00;
 PluginType = Struct;
 PluginName = "公民館2";
 PluginAuthor = "幸一番";
 IconTexture = "..\..\Struct\ekaki1\S81-2.png";
 Description = "昭和初期の公民館式の建物を再現しました。市役所や警察署もこんな感じだったと思います。発光も搭載しましたが昼の間は窓が変です。";
}

StructInfo{
}


PrimaryAssembly{
 Object3D "Main"{
  ModelFileName = "Model.x";
  ModelScale = 1.5;
  NoCastShadow = 0;
                ChangeAlpha = 3, NightAlpha;
                ChangeAlpha = 9, DayAlpha;
  AlphaZeroTest = 0;
  
  Joint3D "_LOCAL"{
   AttachCoord = (0.0, 0.0, 0.0);
   AttachDir = (0.0, 0.0, -1.0);
  }
 }
SoundEffect{
 WaveFileName = "ファイル名.wav";←wavのみ対応
 AttachObject = "Main";←音をつける場所
 SourceCoord = (0.0, 0.0, 2.0);←座標
        Volume = 1100;←音量
        Loop = yes;←多分、近づくと音量があがる?
       }  

   }  

回転はこのようになっています。

 

 PluginHeader{
 RailSimVersion = 2.00;
 PluginType = Struct;
 PluginName = "水車";
 PluginAuthor = "幸一番";
 IconTexture = "..\..\Struct\ekaki1\s488-1.png";
 Description = "今では少なくなりました。";
}

StructInfo{
}


PrimaryAssembly{
 Object3D "dodai"{
  ModelFileName = "Model2.x";
  ModelScale = 1.1;
  Joint3D "_LOCAL"{
   AttachCoord = (0.0, 0.0, 0.0);
  }
 }
 Object3D "mawaru"{
  ModelFileName = "Model1.x";
  ModelScale = 1.0;
  DynamicRotation{
   RotationAxis = (0.0001,0.0,0.0);←回る座標
   RotationSpeed = 0.5;←速さ
  }
  Joint3D "dodai"{
   AttachCoord = (0.0,0.9, -0.01);
  }
 }


}

動きについてはこの様になっています。

 

 luginHeader{
 RailSimVersion = 2.00;
 PluginType = Struct;
 PluginName = "大砲";
 PluginAuthor = "幸一番";
 IconTexture = "D:\鉄道\RailSim2(2.03c)\Struct\ビル1号";
 Description = "昔の大砲です。敵方向に回転できます。高さは90度時のみ設定できます。";
}

StructInfo{
}
DefineSwitch "回転"{
 Entry = "0";
 Entry = "20";
 Entry = "40";
 Entry = "60";
 Entry = "80";
 Entry = "90";
}
DefineSwitch "高さ"{
 Entry = "0";
 Entry = "5";
 Entry = "10";
}


PrimaryAssembly{
 Object3D "Main"{
  ModelFileName = "Model1.x";
  ModelScale = 3.5;

  Joint3D "_LOCAL"{
   AttachCoord = (0.0, 0.0, 0.0);
   AttachDir = (0.0, 0.0, -1.0);
  }
 }

 Object3D "1"{
  ModelFileName = "Model2.x";//回転させる物
  ModelScale = 3.5;//大きさ
  ApplySwitch "回転"{
  Case 1:
   StaticRotation{
    RotationAxis = (0.0, 1.0, 0.0);//←座標
    RotationAngle = 20.0;//←角度
    PreAnimationDelay = 0.0;
    AnimationTime = 1.0;//←時間
    PostAnimationDelay = 0.0;//←指令してから動くまでの時間
   }
  Case 2://←以下同様
   StaticRotation{
    RotationAxis = (0.0, 1.0, 0.0);
    RotationAngle = 40.0;
    PreAnimationDelay = 0.0;
    AnimationTime = 1.0;
    PostAnimationDelay = 0.0;
   }
  Case 3:
   StaticRotation{
    RotationAxis = (0.0, 1.0, 0.0);
    RotationAngle = 60.0;
    PreAnimationDelay = 0.0;
    AnimationTime = 1.0;
    PostAnimationDelay = 0.0;
   }
  Case 4:
   StaticRotation{
    RotationAxis = (0.0, 1.0, 0.0);
    RotationAngle = 80.0;
    PreAnimationDelay = 0.0;
    AnimationTime = 1.0;
    PostAnimationDelay = 0.0;
   }
  Case 5:
   StaticRotation{
    RotationAxis = (0.0, 1.0, 0.0);
    RotationAngle = 90.0;
    PreAnimationDelay = 0.0;
    AnimationTime = 1.0;
    PostAnimationDelay = 0.0;
      }
ApplySwitch "高さ"{

  Case 1:
   StaticRotation{
    RotationAxis = (0.0, 0.0, -1.0);
    RotationAngle = 5.0;
    PreAnimationDelay = 0.0;
    AnimationTime = 1.0;
    PostAnimationDelay = 1.0;
   }
  Case 2:
   StaticRotation{
    RotationAxis = (0.0, 0.0, -1.0);
    RotationAngle = 10.0;
    PreAnimationDelay = 0.0;
    AnimationTime = 1.0;
    PostAnimationDelay = 1.0;
   }
  }
}  
Joint3D "_LOCAL"{
   AttachCoord = (-1.0, 0.0, 0.0);
   AttachDir = (-1.0, 0.0, 0.0);
  }
 }

}

 

次のページへ
前のページへ


最終更新:2010年03月03日 21:16
|新しいページ |検索 |ページ一覧 |RSS |@ウィキご利用ガイド |管理者にお問合せ
|ログイン|