Home   Help Search Login Register  

Author Topic: A Quick Question about Targets  (Read 968 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!