Add support for applying a target flash to actors through lua
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
using Eluant;
|
using Eluant;
|
||||||
using OpenRA.Mods.Common.Activities;
|
using OpenRA.Mods.Common.Activities;
|
||||||
|
using OpenRA.Mods.Common.Effects;
|
||||||
using OpenRA.Mods.Common.Traits;
|
using OpenRA.Mods.Common.Traits;
|
||||||
using OpenRA.Scripting;
|
using OpenRA.Scripting;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
@@ -72,6 +73,13 @@ namespace OpenRA.Mods.Common.Scripting
|
|||||||
{
|
{
|
||||||
return Self.HasScriptProperty(name);
|
return Self.HasScriptProperty(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Desc("Render a target flash on the actor. If set, 'asPlayer'",
|
||||||
|
"defines which player palette to use. Duration is in ticks.")]
|
||||||
|
public void Flash(int duration = 4, Player asPlayer = null)
|
||||||
|
{
|
||||||
|
Self.World.Add(new FlashTarget(Self, asPlayer, duration));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[ScriptPropertyGroup("General")]
|
[ScriptPropertyGroup("General")]
|
||||||
|
|||||||
Reference in New Issue
Block a user