Home   Help Search Login Register  

Author Topic: Targets ?????  (Read 531 times)

0 Members and 3 Guests are viewing this topic.

Popoi

  • Guest
Targets ?????
« on: 16 Nov 2005, 08:27:34 »
I have been looking and looking, but i can't find anything..

Is there a way to tell (programmatically) what a player or unit has targeted? I mean like with the missile lock for the Hellfire or something.

thanks all

klavan

  • Guest
Re:Targets ?????
« Reply #1 on: 16 Nov 2005, 13:19:01 »
The only way I know is to use an eventhandler.
Take a look here:
http://www.ofpec.com/editors/resource_view.php?id=543

But it works only with missiles. I don't think it's possible to do the same with soldier or tanks.

Klavan

Offline 456820

  • Contributing Member
  • **
Re:Targets ?????
« Reply #2 on: 17 Nov 2005, 20:52:20 »
you should be able to do a very time consuming and lagy way in my eyes it wouldnt be worth it but depends why you need it

the idea is to give ever soldier on the map a hit event handler and define the unit you want to find out who its targetting a name or a variable like _unit = this for example
then when a soldier is hit the EH should call a script where you cna check if _unit shot them i think ? but that might only work with a killed EH
but then if the unit did shoot the soldier then you can goto a parrt in the script if not you could exit the script

thats the only way i can think of but it will create a tremendous amount of lag in the game depends what else may be going on