Home   Help Search Login Register  

Author Topic: Detecting which unit activated an action  (Read 524 times)

0 Members and 1 Guest are viewing this topic.

Combat-Agent

  • Guest
Detecting which unit activated an action
« on: 30 Dec 2005, 21:04:50 »
Is there a way to detect which unit activated an action? Here is the the syntax:

[this,(UNIT WHO ACTIVATED ACTION),"wtypeA"] exec "script.sqs"

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Detecting which unit activated an action
« Reply #1 on: 30 Dec 2005, 21:13:38 »
Have a look at the Comref on Addaction - particularly the notes:
http://www.ofpec.com/editors/comref.php?letter=A#addAction

_obj = _this select 0
_man = _this select 1
_index = _this select 2


_obj is the object the action is on
_man is the unit that actioned the action
_index is the action index number
« Last Edit: 30 Dec 2005, 21:14:05 by THobson »