Fandom

武装突袭 Wiki

SetPos

简体 | 繁體

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

您使用了广告屏蔽软件!


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

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

Introduced with Operation Flashpoint version 1.00
  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

点击图片可看到更多讯息

开始使用于

游戏:
Operation Flashpoint
版本:
1.00

描述

描述:
Sets object position.

基本句法

句法:
object setPos pos
参数:
object: Object

pos: Array - [x,y,z] format Position
返回值:
Nothing

范例

范例1:
player setPos [getPos player select 0, getPos player select 1, (getPos player select 2) +10];

//the same as above using modelToWorld: player setPos (player modelToWorld [0,0,10]);

//the same as above using vectorAdd: player setPos (getPos player vectorAdd [0,0,10]);

范例2:
_obj setPos [ getPos _obj select 0, getPos _obj select 1, -5];

范例3:
player setPos (getPos _obj);

额外资讯

多人游戏:
ArmA 1.00 - 1.06: This command has local effect, but some simulation types do synchronise their changes over the network whilst others do not. The only known object types that currently, don't synchronise their positions over the net, are statics (simulation = "house").

Since ArmA 1.08 and later the command is global for every object again.

也可以看看:

setPosASLgetPossetVehiclePositionsetPosAGLS

注意事项

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

Notes

Posted on 14 Dec, 2010
disat
This command takes a PositionAGL. Apparently, Position and PositionAGL are the same thing.

Posted on 6 Feb, 2011
Hduregger
Calling setPos on an object can cause the object's orientation to change. This depends on the terrain and/or objects below the object. This was tested by calling setPos on a test object with the position of a helicopter (modelToWorld with some offset). When flying over land the orientation of the test object would rapidly change depending on the slope of the ground and objects beneath it. Comment applicable to Ver 1.96 and earlier:
obj1 setPos [x,y,z] Will place most objects z metres above ground level (negative numbers for underground). But if obj1 is a trigger then it will be placed z metres above sea level. This can be very useful if you want to check a unit's height above sea level but it can be a problem if you want to move a trigger to create an explosion or a sound. To move a trigger to a location at ground level: triggername setPos [x,y,0]; triggername setPos [x,y,abs(getPos triggername select 2)]; Note for Armed Assault: Using setPos for a trigger will work in exactly the same way that setPos works for other objects - namely that setPos [x,y,z] will place the trigger z metres above ground level. SetPos for static objects like a ammo crate do not work in MP.

Posted on 23 Nov, 2011
Tankbuster
You can use getPos and setPos on triggers.

Bottom Section

更多维基

随机维基