Fandom

武装突袭 Wiki

UserActions

简体 | 繁體

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

您使用了广告屏蔽软件!


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

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

Description编辑

Defines an action to be associated with the current object class. Commonly used for operating doors on vehicles.

Class Properties编辑

  • displayName: string - This is the name displayed in the action menu. It supports structured text syntax, for including icons or changing the text appearance.
  • displayNameDefault: string - This is the name displayed near mid screen. It supports structured text syntax, for including icons or changing the text appearance. Often, only an icon is used in this case.
  • priority: integer - Priority value of the action. Actions will be arranged descending according to this. Value can be negative or decimal. Actions with same values will be arranged in order which they were made, newest at the bottom. Typical range is 0 (low priority) to 6 (high priority).
  • radius: number - Defines the range to the object at which the action will become available. Value is in metres.
  • position: string - (Needs clarification.) Probably a named memory point which acts as the centre for the radius check.
  • showWindow: number/(boolean) - If set to 1 or "true", players see the 'displayNameDefault' name appear near mid screen as they approach the object if the priority is higher than other available actions. Set to 0 or "false" to turn it off.
  • onlyForPlayer: number/(boolean) - (Needs clarification.) Probably disables the action appearing in the Action list (option 6) on the main menu for AI.
  • shortcut: string - One of the key mapping names defined in class 'CfgDefaultKeysMapping' in bin.pbo (e.g. "moveForward").
  • condition: string - Code that must return true for the action to be available. Some standard variables can be used in the evaluation. Variable this references the object to which action is attached to. (Needs confirmation: there must be a caller variable too (_this?).)
  • statement: string - Code that is executed when the action is activated. Some standard variables can be used in the evaluation. Variable this references object to which action is attached to.

Examples编辑

Example 1: class UserActions { class viewHUD { displayName = "<img image='\someAddon\images\icon1.paa' size='1' shadow='false' /> Show HUD"; displayNameDefault = "<img image='\someAddon\images\icon1.paa' size='3' shadow='false' />"; priority = 3; radius = 20; position = "camera"; showWindow = 0; onlyForPlayer = 1; shortcut = "reloadMagazine"; condition = "(player in [gunner this, driver this]) && (alive this)"; statement = "[this, 10] execVM ""\someAddon\scripts\showHUD.sqf"";"; }; };

Additional Information编辑

See also: addAction

更多维基

随机维基