Page 1 of 1

Auto-expiry for map writing/markers via LUA

Posted: 04 Aug 2009, 01:55
by Caydr
If this is already possible, my apologies.

It occurred to me yesterday that certain really useful widgets such as the one that automatically produces a marker at a sighted enemy commander's position result in a lot of map spam and, potentially, confusion. ("Which of these eleventeen-thousand BOI RUNNIN' markers is most recent?")

Since this is a fairly obvious concusion, I decided that it probably just isn't possible for LUA to remove markers, so here I am.

It would be nice if you could have LUA automatically remove a marker if so desired after a certain amount of time.

For your entertainment and as an example, here is some failcode:

Code: Select all

OMGITSACOMMANDER
{
if new_unit_in_los
  {
  if newunit = commander
  make_marker
  wait 60
  remove_marker
  }
}
Yes, I really think writing "computer language" is that simple

As a secondary use, a widget might be made which automatically removes any writing/markers after a certain defined period of time.

Since the coding elite already stopped reading and have begun writing the "ffs this goes in the lua forum", I'll add this bit here: I'm not requesting a widget, I'm requesting that a widget be able to do something, meaning an engine modification. Thxbai

Re: Auto-expiry for map writing/markers via LUA

Posted: 04 Aug 2009, 02:16
by Argh
Um... I think a lot of what you're talking about could be fixed if the Lua guys used OpenGL instead of throwing down map markers (engine-side stuff they don't have full control over atm).

IOW, I agree with you about the annoyance, but I think that ultimately it's the Widget guys' issue, and they need to quit using Markers but instead just store locations XYZ and if one of those is in the POV, then display... then manage their lists to weed out old sightings.

Re: Auto-expiry for map writing/markers via LUA

Posted: 04 Aug 2009, 13:09
by AF
You shouldn't just wait 60 seconds you should remove all the existing markers for that commander too, there should only be one last seen marker, not 10 sightings in the last 60 seconds, for ten commanders