Fandom

武装突袭 Wiki

How to create destroyable wheels

简体 | 繁體

4,827个页面创建
于此维基上
添加新页面
评论0 分享

您使用了广告屏蔽软件!


Wikia通过广告运营为用户提供免费的服务。我们对用户通过嵌入广告屏蔽软件访问网站进行了使用调整。

如果您使用了广告屏蔽软件,将无法使用我们的服务。请您移除广告屏蔽软件,以确保页面正常加载。

The Principle编辑

The model already contains the destroyed wheels, but they are hidden with animations. These animations uses the damage value of hitpoints to switch the wheels when needed.

Prepare the model编辑

In the case of wheels it makes sense to create an extra model for a destroyed wheel. This way you are able to implement the destroyed wheels in the original model via proxies which reference to the destroyed wheel model. It doesn't need to be done via proxies though. Now, you just need to create named selections for every wheel and for every destroyed wheel. The normal wheels are called "wheel_x_x_hide" and the destroyed ones "wheel_x_x_unhide" in this tutorial.

The Animations编辑

You should have some basic knowledge about animations and model.cfg as this is not covered here.

The following class is an example animation that makes the destroyed wheel visible:

class wheel_1_1_destruct_unhide
{
   type="hide";
   source="HitLFWheel";
   sourceAddress="mirror";
   selection="wheel_1_1_unhide";
   minValue = -1;
   maxValue = 0;
   minPhase = -1;
   maxPhase = 0;
   hideValue = 0.010000;
};

The animation that hides the undestroyed wheel looks like this:

class wheel_1_1_destruct
{
   type="hide";
   source="HitLFWheel";
   selection="wheel_1_1_hide";
   minValue = 0;
   maxValue = 1;
   minPhase = 0;
   maxPhase = 1;
   hideValue = 0.990000;
};

Make sure that the sum of the hideValues of two corresponding anims is 1, so the switch happens at the same time.

Animation sources编辑

The animationsource used in the previous section is a custom one which needs to be defined in the config of the vehicle:

class AnimationSources
{
  class HitLFWheel
  {
   source = "Hit";
   hitpoint = "HitLFWheel";
   raw = 1;
  };
};

The hitpoint entry refers to the hitpoints defined in the vehicle config, e.g.

class HitLFWheel
{
   armor = 0.15;
   material = -1;
   name = "wheel_1_1_steering";
   visual = "";
   passThrough = 0.3;
};

更多维基

随机维基