From a36a77d6371e72e860d0c1529d64b23700557a7c Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Sat, 15 Oct 2016 18:14:24 +0200 Subject: [PATCH] Add a note about EnemyWatcher being required for On(Player)Discovered --- OpenRA.Mods.Common/Scripting/Global/TriggerGlobal.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Scripting/Global/TriggerGlobal.cs b/OpenRA.Mods.Common/Scripting/Global/TriggerGlobal.cs index e719f5fefb..0fe57aa6c7 100644 --- a/OpenRA.Mods.Common/Scripting/Global/TriggerGlobal.cs +++ b/OpenRA.Mods.Common/Scripting/Global/TriggerGlobal.cs @@ -419,14 +419,16 @@ namespace OpenRA.Mods.Common.Scripting } [Desc("Call a function when this actor is discovered by an enemy or a player with a Neutral stance. " + - "The callback function will be called as func(Actor discovered, Player discoverer).")] + "The callback function will be called as func(Actor discovered, Player discoverer). +" + + "The player actor needs the 'EnemyWatcher' trait.")] public void OnDiscovered(Actor a, LuaFunction func) { GetScriptTriggers(a).RegisterCallback(Trigger.OnDiscovered, func, Context); } [Desc("Call a function when this player is discovered by an enemy or neutral player. " + - "The callback function will be called as func(Player discovered, Player discoverer, Actor discoveredActor).")] + "The callback function will be called as func(Player discovered, Player discoverer, Actor discoveredActor)." + + "The player actor needs the 'EnemyWatcher' trait.")] public void OnPlayerDiscovered(Player discovered, LuaFunction func) { GetScriptTriggers(discovered.PlayerActor).RegisterCallback(Trigger.OnPlayerDiscovered, func, Context);