Fandom

武装突袭 Wiki

Custom Waypoints

简体 | 繁體

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

您使用了广告屏蔽软件!


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

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


Custom waypoints are a new feature introduced in Take On Helicopters. It enables community coders to add a new waypoint with all its complex functionality to easily accessible waypoint menu.

Custom waypoints are a shell for already existing scripted waypoints, where path to the executed script had to be typed in manually. New system avoids using any abolute path and wraps all the functionality in simple-to-use user interface.

Notice when you select a custom waypoint, Script field changes to Arguments, where you can pass additional data to the waypoint.

List 编辑

Config 编辑

class cfgWaypoints
{
	//--- Waypoints category class
	class HSim
	{
		//--- Waypoints category description (visible in menu)
		displayName = $STR_HSIM_cfgWaypoints_HSim;

		//--- Waypoint class
		class wpLand
		{
			//--- Waypoint description (visible in menu)
			displayName = "Land";

			//--- Path to executed scripts
			file = hsim\Modules_H\functions\waypoints\fn_wpLand.sqf;
		};
	};
};

Scripts 编辑

By default, all official waypoints are executing functions that can be also called manually, outside of waypoint structure. To achieve it, all of these functions are including custom header, which recognizes execution type and initializes params correctly:

#include "\HSim\Modules_H\functions\Waypoints\variableSettings.hpp"

Execution Methods 编辑

Waypoint (Editor)编辑

File:Tkoh editor waypoints custom.jpg

Default use. Waypoint is selected in menu, arguments are typed in Arguments field (see attached picture).

Arguments are passed as Array, whose content differs for every waypoint.

For example, for BIS_fnc_wpTimed (COUNTDOWN), it can look like this:

[{hintC "You failed!"},60,true]

If no arguments are set, default values are used.


Waypoint (Script)编辑

Attach function to given waypoint. Function waits until waypoint becomes active

[group,id,<arguments>] spawn <functionName>;

Code is done when waypoint conditions were met.


Function 编辑

Run function with given params.

[object,target,completionRadius,<arguments>] spawn <functionName>;
  • object: Object - object to which waypoint belongs
  • target: Array or Object - position or target where waypoint is placed
  • completionRadius: Number - completion radius in which waypoint is finished
  • <arguments> - arguments specific for every waypoint type

Code is done when waypoint conditions were met.

Action 编辑

Executed by addAction command.

OBJECT addaction [
	"Action Name",
	"<functionName>" call BIS_fnc_functionPath,
	<arguments>,
	...
];

Header Variables 编辑

Header declares local variables, which can be used by waypoint script:

  • _params: Array - passed arguments
  • _group: Group
  • _wp: Array - assigned waypoint (current waypoint for Function and Action activation)
  • _wpID: Number - waypoint ID
  • _wpPos: Array - waypoint position
  • _target: Object - waypoint target. objNull if none was set (e.g. when position is used only)
  • _veh: Object - vehicle of group leader
  • _completionRadius: Number - waypoint completion radius (Default: 420 m)
  • _statements: Array - waypoint statements (Default: ["true","",""])
  • _condition: Code - waypoint condition from _statements (Default: {true})
  • _isExpired: Code - code for checking if waypoint is still valid. Exit when true in every loop. Always false for Function and Action execution
  • _fnc_addRating: Code - adds rating to all waypoint group members. Passed argument is Number - added rating, later multiplied by bis_wpRating

更多维基

随机维基