Fandom

武装突袭 Wiki

Notification

简体 | 繁體

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

您使用了广告屏蔽软件!


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

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

File:A3 notification.jpg

In Arma 3, you can show mission or system notification using BIS_fnc_showNotification function.

["TaskSucceeded",["Disable the nuke"]] call bis_fnc_showNotification;
["ScoreAdded",["Disabled the nuke without triggering an alarm.",5]] call bis_fnc_showNotification;

Instead of defining every single param over and over again in multiple missions, you can simply point to a template defined in CfgNotifications class either in mission / campaign description.ext or in global config.cpp.

You can send additional arguments into the template, where they are applied to title, icon or description using format command.

class CfgNotifications
{
	class Default
	{
		title = ""; // Tile displayed as text on black background. Filled by arguments.
		iconPicture = ""; // Small icon displayed in left part. Colored by "color", filled by arguments.
		iconText = ""; // Short text displayed over the icon. Colored by "color", filled by arguments.
		description = ""; // Brief description displayed as structured text. Colored by "color", filled by arguments.
		color[] = {1,1,1,1}; // Icon and text color
		duration = 5; // How many seconds will the notification be displayed
		priority = 0; // Priority; higher number = more important; tasks in queue are selected by priority
		difficulty[] = {}; // Required difficulty settings. All listed difficulties has to be enabled
	};
 
	// Examples
	class TaskAssigned
	{
		title = "TASK ASSIGNED";
		iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIcon_ca.paa";
		description = "%1";
		priority = 7;
	};
	class ScoreAdded
	{
		title = "Score bonus";
		iconText = "+%2";
		description = "%1";
		color[] = {0.5,1,1,1};
		priority = 0;
		difficulty[] = {"netStats"};
	};
};

更多维基

随机维基