Fandom

武装突袭 Wiki

SetHit

简体 | 繁體

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

您使用了广告屏蔽软件!


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

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

  Arguments of this scripting command 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 2
版本:
1.00

描述

描述:
Damage / repair part of object. The object must be local to the computer where command is executed.

Damage 0 means fully functional, damage 1 means completely destroyed / dead. Note: Some part names are in Czech; see translation table.

基本句法

句法:
object setHit [part, damage]
参数:
object: Object -

part: String - Name of the part (selection name).

damage: Number -
返回值:
Nothing

范例

范例1:
vehicle player setHit ["motor", 1]

范例2:
vehicle player setHit ["mala vrtule", 0.95]

范例3:
if (local _heli) then { _heli setHit ["velka vrtule", 0]; } else { hint "Vehicle " + str _heli + " must be local to this machine to do that!"; };

额外资讯

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

getHitgetHitPointDamagesetHitPointDamagedamagesetDamagesetFuelsetAmmogetHitIndexsetHitIndex

注意事项

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

Notes

Deadfast
Damaging specific parts of the vehicle will not update its overall damage value (as of v1.03):

player setHit ["hands", 0.9];
hint str (damage player); //will return 0


denisko.redisko
Direct use of the names of sections of the model is likely a bad practice, and will not work on some addons. So instead:

_MH60S setHit ["elektronika", _hit];

should be used:

_MH60S setHit [getText(configFile >> "cfgVehicles" >> "MH60S" >> "HitPoints" >> "HitAvionics" >> "name"), _hit];


Sa-Matra
Since there is no getHit (as of 1.61), you can use canMove command to check if vehicle is capable of moving.

For land wheeled vehicles canMove will return false if any real wheel (damaging nonexistent wheels doesn't count) has hitpoint damage greater than 0.9. Having HitEngine damage greater than 0.9 will make canMove to return false as well (plus will result in vehicle exploding). HitFuel however doesn't make canMove return false even though having high HitFuel damage will make car explode.

For helicopters HitEngine with damage greater than 0.9 will make canMove return false as well. Having HitHRotor (main rotor) damaged even up to 1 will never make canMove return false. However, if HitVRotor (tail rotor) will have damage greater than 0.703608 it will make canMove return false (even though some helicopters are controllable and flyable by player with broken tail rotor).

In same manner you can use canFire to check if turret hitpoints are not damaged enough to be able to fire. (canFire always returns false if there is nobody in vehicle)

Update: Since ArmA 3 1.31 getHit has been introduced.

Bottom Section

更多维基

随机维基