Loading...
  OR  Zero-K Name:    Password:   

Post edit history

Help with lua gadgets - Detection target of a shot

To display differences between versions, select one or more edits in the list using checkboxes and click "diff selected"
Post edit history
Date Editor Before After
3/5/2013 10:38:44 AMEErankAdminAnarchid before revert after revert
3/5/2013 10:36:53 AMEErankAdminAnarchid before revert after revert
3/5/2013 10:35:32 AMEErankAdminAnarchid before revert after revert
3/5/2013 10:34:45 AMEErankAdminAnarchid before revert after revert
Before After
1 [quote] Do not poll the actual projectile targets just for the sake of AI. It sounds very slow.[/quote] 1 [quote] Do not poll the actual projectile targets just for the sake of AI. It sounds very slow.[/quote]
2 Using the new callins linked above, there would be no actual polling. 2 Using the new callins linked above, there would be no actual polling.
3 \n 3 \n
4 [b]On[/b] projectileCreated: (if in managed weapons table) add target to some targets list so you can manage it; add projectile to another table. 4 [b]On[/b] projectileCreated: (if in managed weapons table) add target to some targets list so you can manage it; add projectile to another table.
5 \n 5 \n
6 If projectile is a guided missile and you want to do some retargeting logic here: change projectile target. 6 If projectile is a guided missile and you want to do some retargeting logic here: change projectile target.
7 \n 7 \n
8 [b]On[/b] projectileDestroyed: remove projectile from list; if no live projectiles still point to target, remove that too. 8 [b]On[/b] projectileDestroyed: remove projectile from list; if no live projectiles still point to target, remove that too.
9 \n 9 \n
10 [b]On[/b] unitDestroyed (if in target table): remove (kill or abandon, your choice) or retarget all linked projectiles. 10 [b]On[/b] unitDestroyed (if in target table): remove (kill or abandon, your choice) or retarget all linked projectiles.
11 \n 11 \n
12 That's pretty much it. Doesn't sound any heavier than, for example, wolverine mines spawning units. 12 That's pretty much it. Doesn't sound any heavier than, for example, wolverine mines spawning units.
13 \n
14 I see no reason to actually manage overkill for rapid-fire non-guided weapons like razorkiss and cobra/copperhead, so most of those would apply to slow-firing guided-missile weapons that shouldn't produce much spamload. (possible exception is wandel, but wandel is also rapid-fire, so could be omitted).