Home   Help Search Login Register  

Author Topic: My sad targeting script  (Read 1904 times)

0 Members and 1 Guest are viewing this topic.

Offline GEFFO50

  • Members
  • *
My sad targeting script
« on: 10 Feb 2008, 22:49:16 »
I've been messsing about with a target sifting script....(GEFFODESTROY)

My initial idea was to have a way to prioritise targets and attack them accordingly. I have something that works but it looks very simple (as am I)
My first script (GEFFODESTROY) just shows the target sifting process. Er very simple really. For effect, I've used Mando Missiles to deliver the destruction (hope Mando doesn't mind)
I do have several conventional attacks that work using the sifted target but Mando Missiles are just the best way to destroy stuff :)

Have a quick look and see if this is worth further work.

Thx....Geffo

Oh check out GEFFODEFECTA too....  :D

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: My sad targeting script
« Reply #1 on: 10 Feb 2008, 23:04:42 »
Hi GEFFO,
I see you are using a very very old mando missile suite, as current one has already an automatic targeting system with criteria based on type, side, scan angles, range and also considering line of sight  ;)

You will find a problem using nearestObjects with long distances, as objects are not precatched in the map, so the first time you execute your script on a fresh map it might freeze the game for a second of more. You may try to change that method for a dynamic created trigger detecting "ANY" inside the desired range, and then you just discriminate whatever should be a target and whatever should not checking the list of the trigger and the side and type of any object inside. This way you will not notice any performance hit in the game.


Offline GEFFO50

  • Members
  • *
Re: My sad targeting script
« Reply #2 on: 11 Feb 2008, 11:34:53 »
Thx for the quick response.

I hadn't realised there was a newer version of your missile scripts.
As they will do what I want I think I can abandon my feeble progect.

Wish I had a bigger brain.....:(
thx m8...don't want to sound too sick but your stuff is beyond excellent.
Just love blowing stuff up from my comfy chair......Hey NORAD.....can I come and work for you ?
 ;)

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: My sad targeting script
« Reply #3 on: 11 Feb 2008, 11:41:14 »
Wait, wait.
The missile automatic targeting system is part of the Mando Missile ArmA suite, and it is designed to convert anything into an automatic missile launcher, even a rock, that's all.

You may continue with your project as a generic target selector, usable not only for missiles but also for arty or even to move troops to intercept enemy attacks which actually are beyond visual range.

Just take into consideration that your current detection method might be highly optimized using a dynamically created trigger instead of using nearObjects, unless the detection range is quite short.

Offline GEFFO50

  • Members
  • *
Re: My sad targeting script
« Reply #4 on: 14 Feb 2008, 17:30:02 »
Ok. Thanks for the advice.

Although my simplisic approach did work there are a few lag issues..or should that be laaaaaaaaaaaaaaaaagggg.

A dynamic trigger you say...what is a dynamic trigger ?....never mind I will absorb myself experimenting. Perhaps I can come up with a more sophisticated solution...LOL..
I appreciate OFPEC being here. For us programming novices the info is invaluable.

I shall return with a dynamic targetting script within the month.......and please, try not to laugh or cry when you see it.

Thks mando and all......
bye 4 now.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: My sad targeting script
« Reply #5 on: 14 Feb 2008, 18:49:45 »
This is a dynamic trigger, code is extracted from new MMA 2.3:
Code: [Select]
if (_createtrigger) then
{
   _trigger = createTrigger ["EmptyDetector", getPos _disp];
   _trigger setTriggerActivation ["ANY", "PRESENT", false];
   _trigger setTriggerArea [_maxrange, _maxrange, 0, false];
   _trigger setTriggerType "NONE";
   _trigger setTriggerStatements ["this", "", ""];
   _trigger setTriggerTimeout [0, 0, 0, false ];
};