Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: A Quick Question about Targets  (Read 1540 times)

0 Members and 1 Guest are viewing this topic.

Lone-Wolf

  • Guest
A Quick Question about Targets
« on: 13 Oct 2009, 22:06:42 »
Hi - I have a quick question:

Is there a way of assessing what a unit's target is and then assigning that object to a variable for use in a script?  ???

Offline firegraphite

  • Members
  • *
Re: A Quick Question about Targets
« Reply #1 on: 24 Oct 2009, 05:26:57 »
Hi!

I never really tried that although perhaps you could try experimenting with the "knowsabout" command. There are values you could assign to knowsabout which determines how much a certain unit knows about another unit.

example would probably go like this:
?friendlygoon1 knowsAbout enemygoon8 > 0.105:busted=true

or in trigger:

condition: friendlygoon1 knowsAbout enemygoon8 > 0.105
on activation: busted = true

0.105 i think is a certain value where a unit knows exactly about the other unit. Try looking it up, i'm not entirely sure. Then you could perhaps experiment to find which value exactly of knowsabout is returned when a unit actually targets another.
In the above example, 'busted' is the variable.
If the above don't work, well, maybe try eventhandlers. but I really don't know much about those...

Cheers!