Fandom

武装突袭 Wiki

AnimateSource

简体 | 繁體

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

您使用了广告屏蔽软件!


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

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

Introduced with Arma 3 Development Branch version 1.57
  Arguments of this scripting command don't have to be local to the client the command is executed onEffects of this scripting command are broadcasted over the network and happen on every computer in the network

点击图片可看到更多讯息

开始使用于

游戏:
Arma 3 Development Branch
版本:
1.57

描述

描述:
Process an animation of the object. If animate uses class name from CfgModels Animations, animateSource uses name defined by source property. This allows to use just one command on a bunch of animations related to the same source simultaneously.

A class with the same source name should also be present in main config in CfgVehicles AnimationSources and have to be bound to the "user" controller for the command to work. If in order to animate door in example below using animate command it would require 2 calls:

house animate ["Door_1_rot", 1];
house animate ["Door_Handle_1_rot", 1];

With animateSource this would require only 1 (provided everything is configured correctly):

house animateSource ["Door_1_source", 1];

// model.cfg
....
class Animations
{
	class Door_1_rot
	{
		type = rotation;
		source = Door_1_source;
		selection = Door_1;
		axis = Door_1_axis;
		memory = 1;
		minValue = 0.1;
		maxValue = 1;
		angle0 = 0;
		angle1 = (rad 110);
	};
	class Door_Handle_1_rot
	{
		type = rotation;
		source = Door_1_source;
		selection = Door_Handle_1;
		axis = Door_Handle_1_axis;
		memory = 1;
		minValue = 0;
		maxValue = 0.1;
		angle0 = 0;
		angle1 = (rad -50);
	};
};
...
 
// config.cpp
...
class AnimationSources
{
	class Door_1_source
	{
		source = "user";
		animPeriod = 2;
		initPhase = 0;
	};
};
...

If you don't know much about model config you can use this page createVehicle/vehicles for reference. Some of the AnimationSources are listed with the class names of the available assets in Arma 3. If it says "user", the chances are it could work with animateSource (see example 2).

Arma 3 logo black.png It is recommended that animateSource command is used instead of animate whenever is possible, as it is more efficient and optimized for MP
20px Mixing animateSource command with animate command to animate the same part can lead to unexpected behavior

基本句法

句法:
object animateSource [source, phase, instant]
参数:
object: Object

[source, phase, instant]: Array

source: String - common source

phase: Number - wanted animation phase

instant: Boolean - when true animation is instant
返回值:
Nothing

范例

范例1:
house animateSource ["Door_1_source", 1, true];

范例2:
Create UGV and manipulate its turret (Currently not possible to do with animate command. See createVehicle/vehicles for reference)ugv = "B_UGV_01_F" createVehicle (player getRelPos [5, 0]); ugv addAction ["Show Turret", { ugv animateSource ["Turret", 0]; ugv animateSource ["MainTurret", rad 0, true]; ugv animateSource ["MainGun", rad 0, true]; }]; ugv addAction ["Hide Turret", {ugv animateSource ["Turret", 1]}]; ugv addAction ["Turret Left", {ugv animateSource ["MainTurret", rad 90]}]; ugv addAction ["Turret Right", {ugv animateSource ["MainTurret", -rad 90]}]; ugv addAction ["Turret Up", {ugv animateSource ["MainGun", rad 30]}]; ugv addAction ["Turret Down", {ugv animateSource ["MainGun", -rad 20]}];

额外资讯

多人游戏:
-
也可以看看:

animationSourcePhaseanimateDooranimatesetFaceAnimation

注意事项

此处撰写句法皆为可行用法. 可到官网[1]专页回报错误. 你可以使用讨论页面或是论坛来进行讨论.
新增注意事项 | 如何新增?

Notes

Bottom Section

更多维基

随机维基