Home   Help Search Login Register  

Author Topic: event handaler  (Read 464 times)

0 Members and 1 Guest are viewing this topic.

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
event handaler
« on: 30 Nov 2004, 03:37:06 »
how do you detect if a certain unit has been shot at?
see im making a script which detects if a unit is shot at and then makes them duck and stuff.

How do i make it so a unit will be set to combat mode blue if it detects that they are shot at?

how do i switch them back to yellow when they are not being shot at any more?
and how would i put this in a script?
thanks

Offline CrashDome

  • Members
  • *
Re:event handaler
« Reply #1 on: 30 Nov 2004, 09:28:29 »
you can add a "Fired" event handler to ALL other units. Then check if they are a target of one of those units. Won't work for players though since they do not target automatically.

bored_onion

  • Guest
Re:event handaler
« Reply #2 on: 30 Nov 2004, 22:01:18 »
surely you could make a trigger that encompasses all units without having to repeat it in every init field with the 'in thislist' command

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:event handaler
« Reply #3 on: 01 Dec 2004, 00:35:11 »
yes but isint there a way to detect if a man is targeted by AI