Skip to content

Commit

Permalink
Update variables for Flash lua function.
Browse files Browse the repository at this point in the history
  • Loading branch information
MustaphaTR authored and abcdefg30 committed Mar 5, 2022
1 parent 7e4c3ac commit 0203476
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions OpenRA.Mods.Common/Scripting/Properties/GeneralProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ public bool HasProperty(string 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)
[Desc("Render a target flash on the actor.")]
public void Flash(Color color, int count = 2, int interval = 2, int delay = 0)
{
Self.World.Add(new FlashTarget(Self, asPlayer?.Color ?? Color.White, duration));
// TODO: We can't use floats with Lua, so use the default 0.5f here
Self.World.Add(new FlashTarget(Self, color, 0.5f, count, interval, delay));
}

[Desc("The effective owner of the actor.")]
Expand Down

0 comments on commit 0203476

Please sign in to comment.